A judge blocked a controversial ballot measure on Thursday that would have banned the circumcisions of minors in San Francisco, citing religious freedom and laws regulating medical procedures in deciding it had "no legitimate purpose."

Superior Court Judge Loretta Giorgi's ruling effectively ended a debate that was charged with questions of religious freedom and protecting minors. Proponents of the ban said the circumcision of minors submitted unconsenting children to a potentially harmful practice, while others countered that it would have prevented observant Jews and Muslims from performing an indispensable religious ritual.

Giorgi said the ban would exceed the city's authority -- the California Business and Professions Code prohibits local regulation of medical procedures, leaving that responsibility to the state. Proponents of the ban argued unsuccessfully that circumcisions have no health benefits and therefore cannot be considered medical procedures. Even if the ban did not conflict with regulatory law, it would violate First Amendment protections guaranteeing free exercise of religion, Giorgi added.

Michael Kinane, an attorney representing the San Francisco man who sought to get the measure on the ballot for November elections, said that no California laws are "sufficient to justify the mutilation of little infants."

"In the City and County of San Francisco, one of the places in the world that protects human rights more than anywhere in the world, we have reasonable health and safety right to protect our little babies from circumcision," he said.

The ruling was a victory for critics who said the ban would violate privacy and impinge on a sphere of life in which the government has no place. Debate over the measure had been charged by accusations of anti-Semitism, which intensified when proponents of the ban published a comic book in which a hero named Foreskin Man fought depraved Orthodox jews.

"It is up to parents to make the choice whether or not to have their baby boys circumcised," said Abby Michelson Porth, associate director of the Jewish Community Relations Council. "We did not want to have Mr. Schofield legislating our religious traditions."