SAN FRANCISCO — A US judge ruled Thursday that a proposal to ban male circumcision in San Francisco should not be put to a referendum later this year, despite having secured the necessary support .

The ballot initiative, which made the November ballot after "intactivist" supporters gathered the required 7,000 signatures this spring, would have made the circumcision of minors a misdemeanor except in cases of medical necessity.

But judge Loretta Giorgi ruled in favor of a coalition of religious groups, doctors and families who claimed the proposed ban violated a state law that prohibits local governments from regulating medical procedures.

She ruled it would "serve no legitimate purpose" for an "expressly preempted" ban to remain on the ballot, and ordered the city to remove it.

Proponents of the initiative have vowed to appeal, though they may not have the legal right to do so.

Lloyd Schofield, 59, who has been at the helm of the San Francisco effort, says circumcision is essentially culturally accepted genital mutilation, and should be a matter of individual, not parental, choice.

Both pro- and anti-circumcision advocates make health claims, but the medical research does not firmly support either position.

Circumcision is a central rite of both the Jewish and Muslim faiths, and leaders from the two communities joined together to fight the ban.

"The measure was divisive and was hostile to Muslims and Jews," said Abby Porth of the Jewish Community Relations Council. "This was a confirmation of the values that we both share and an opportunity to do something positive together."

The San Francisco City Attorney's Office took the unusual step of coming out against the measure in June, citing a controversial "Foreskin Man" comic book released by proponents of the ban that featured a blonde, blue-eyed superhero fighting caricatured Jewish villains.

Earlier this month, two state legislators introduced a bill that would have prevented local governments from enacting laws regarding male circumcision.

California's voter initiative system allows residents to place virtually anything on the ballot so long as they secure the required number of signatures.

Many of California's most controversial policies have been passed this way, among them a drastic reduction in property taxes and a ban on gay marriage.

The measure would have made San Francisco the first city in the country to put the circumcision of minors to a popular vote.