Lawmakers in San Francisco have narrowly approved a ban on public nudity after complaints regarding the city’s famous gay Castro district.

OutQ News reported on Tuesday, they voted 6-5 to prohibit people from exposing their genitals in most public places.

Exceptions will be allowed for certain street fairs and events.

In September, District Supervisor Scott Wiener pushed for the nudity ban in answer to constituents fed up with seeing naked men hanging out in the heart of the Castro district.

Far from being a “quirky part of San Francisco,” Mr Wiener said the issue had become extreme and required city action.

But fellow gay District Supervisor David Campos disagreed.

Mr Campos said nudity had always been part of the Castro scene.

He voted against the ban, unconvinced the issue warranted such a blanket prohibition.

Those who break the ban could face $100 (£62) fines or a year in jail for repeat offenders.

Urban nudists hope a federal judge will block the law from taking effect.

A hearing has been scheduled for January.