SAN FRANCISCO -- San Francisco's lawmakers are voting Tuesday on whether to ban nudity in a city where anything goes, including clothes.

The ordinance would prohibit nudity in most public places. It represents an escalation of a two-year fight between a group of men who strut their stuff through the city's famously gay Castro District and the supervisor who represents the area.

Supervisor Scott Wiener's proposal would make it illegal for a person over the age of 5 to "expose his or her genitals, perineum or anal region on any public street, sidewalk, street median, parklet or plaza" or while using public transit.

"I don't think having some guys taking their clothes off and hanging out seven days a week at Castro and Market Street is really what San Francisco is about. I think it's a caricature of what San Francisco is about," Wiener said.

Exemptions would be made for participants at permitted street fairs and parades, such as the city's annual gay pride event and the Folsom Street Fair, which celebrates sadomasochism and other sexual subcultures.

A first offence would carry a maximum penalty of a $100 fine, but prosecutors would have authority to charge a third violation as a misdemeanour punishable by up to a $500 fine and a year in jail.

Wiener said he felt compelled to act after constituents complained about the naked men who gather in a small Castro plaza most days and sometimes walk the streets au naturel. He persuaded his colleagues last year to pass a law requiring a cloth to be placed between public seating and bare bottoms, but the complaints have continued.

The proposed ban predictably has produced outrage, as well as a lawsuit. Last week, about two dozen people undressed in front of City Hall and marched around the block to the amusement of gawking tourists.

Stripped down to his sunglasses and hiking boots, McCray Winpsett, 37, said he understands the disgust of residents who would prefer not to see the body modifications and sex enhancement devices sported by some of the Castro nudists. But he thinks Wiener's prohibition goes too far in undermining a tradition "that keeps San Francisco weird."

"A few lewd exhibitionists are really ruining it for the rest of us," he said.

Because clothes are required to enter City Hall itself, demonstrators who try to disrobe at the Board of Supervisors meeting will be escorted out by sheriff's deputies. That is what happened last Monday when Gypsy Taub removed her dress during the ban's first public hearing.

"I thought if I take my clothes off, I bet they are going to listen," the mother of two said.

San Francisco lawyer Christina DiEdoardo filed a federal lawsuit last week on behalf of Taub and three men that seeks to block Weiner's ordinance. The complaint alleges that the ban infringes on the free speech rights of nudists and discriminates against those who cannot afford to obtain a city permit.