By Alison Freeman
BBC News, London
Ken Livingstone has accused Westminster Council of "attacking" Soho's gay identity after it told bars to take rainbow flags down from outside.
Removing the flag is said to have caused confusion among visitors
The council instructed pubs in the area to remove the Freedom flags on planning grounds or face fines.
It insists the move is in no way homophobic and said any flag added onto a building would need approval.
But in a letter to the council leader the Mayor of London said it was "deeply offensive to lesbian and gay people".
He went on to say he wanted to see all flags "restored to their rightful place as soon as possible".
A Westminster City Council spokeswoman said some Soho establishments which did not have planning permission to have a flag pole had been told to take flags down.
She said: "Placing a flag pole on the exterior of a building is a structural change that the establishment would need planning permission to make".
The spokeswoman also said Soho was a conservation area and there were lots of businesses who want to put 'adverts' on their premises.
But Mr Livingstone said in the letter: "It is remarkable that Westminster City Council has decided to attack a key element of the cultural identity of Soho, the heart of London's gay community, a major entertainment zone and a key area for gay business.
"I am astounded that a flag designed almost 30 years ago as a symbol of lesbian and gay community pride, as an optimistic alternative to the more common pink triangle symbol, is to be removed as it is deemed to be advertising. "
A spokeswoman for the Admiral Duncan - the pub attacked by the Soho nail bomber - said they had been warned they could be fined £250 for every day the flag was left up.