One woman and three men -- one wearing just a mesh thong -- were taken into custody as about a dozen other protesters in various states of undress paraded around with painted slogans on their bodies, holding up signs with messages such as "The Human Body is Beautiful."
Police gave them a 15-minute warning to disperse or put pants on before officers arrested those who failed to cover themselves. The protesters said their arrest would advance the cause of "body freedom."
"No matter what, we're going to continue practicing body freedom," said Gypsy Taub, a mother of two who hosts a local cable program devoted to the nudist cause. "In a society that's repressed and crazy, that glorifies war and at the same time criminalizes the human body ... nudity is a political statement."
In December, the Board of Supervisors voted 7-4 in favor of the ordinance, which prohibits exposed genitals in most public places, including streets, sidewalks and public transit. A federal judge ruled Tuesday that nudity was not protected free speech and upheld San Francisco's ban on most displays of public nudity.
Protesters vowed to appeal the judge's decision.
Police spokesman Albie Esparza said the arrests were simply an attempt to enforce compliance with the law, which the city enacted after residents complained about people in various stages of undress.
"We're not here to arrest and cite people if we don't have to, but if we have to, we will enforce the law," he said. "We want to admonish as many people as possible and try to gain compliance."
Activists challenging the measure also had argued that the ordinance was unfair because it grants exceptions for nudity at permitted public events such as the city's gay pride parade. They complained that forcing people to cover up would undermine San Francisco's reputation as a city without inhibitions.