The city attorney’s office made the argument in response to a lawsuit by a coalition of Jews and Muslims that has asked a California court to remove the initiative from the Nov. 8 ballot.

The lawsuit, which names the city and the anti-circumcision activist who qualified the measure, argues that state law bars local governments from restricting medical procedures.

But if a judge accepts that reasoning and excludes only physicians from the ban, the measure would target only religious faiths that practice circumcision and would therefore run afoul of the First Amendment’s guarantee of religious freedom, lawyers for the city wrote in court papers.

“San Franciscans cannot be asked to vote on whether to prohibit religious minorities from engaging in a particular religious practice, when the same practice may be performed under nonreligious auspices,” the city’s brief said.

“If the court concludes that the measure is pre-empted as applied to medical professionals, then the remaining application is unconstitutional and the court should remove the measure from the ballot entirely.”

The measure would prohibit circumcision on males under the age of 18, making it a misdemeanor punishable by a fine or jail time. It does not carry any religious exemptions.

As evidence that the proposed ban “specifically targets the centuries-old Jewish religious practice known as brit milah,” the city’s attorneys cited comic books and cards distributed by the measure’s proponents that “portray the battle against circumcision as one between good, represented by a blonde, blue-eyed superhero and his fair-skinned female friend, and evil, represented by four dark-haired, dark-skinned menacing Jewish characters with prominent noses, sinister expressions and sadistic tendencies.”