Hasidim insist that they are adopting a more confrontational approach only because they are defending their faith’s precepts. Rabbi David Niederman, executive director of the United Jewish Organizations of Williamsburg, said issues like the use of well water in matzos are “core Jewish religious beliefs and will not change, but where there’s ways to work with the government, we will do that.”

On the other side, city officials say their main obligation is to enforce the laws even if it might seem antagonistic to ultra-Orthodox traditions. “We don’t have a formal policy, but we can’t commit to providing a female lifeguard because it would run against the establishment clause of providing a service on the basis of a religious belief,” Liam Kavanagh, first deputy commissioner for parks and recreation, said of the Hasidic request.

Meanwhile, the conflicts and predicaments seem to be multiplying. The city’s Commission on Human Rights issued complaints last year against a half-dozen Hasidic merchants on Williamsburg’s Lee Avenue for posting signs stating, “No shorts, no barefoot, no sleeveless, no low-cut neckline allowed in this store.” The signs, the city said, discriminated against women and non-Orthodox men in places patronized by the public. Hasidic advocates said the signs were no different than dress codes at places like the Four Seasons Restaurant. The dispute is still being litigated in a city administrative court.

Most prominently, the city has battled with ultra-Orthodox Jewish representatives over the health risks in metzitzah b’peh, a technique for orally suctioning a circumcision wound. Instead of banning the practice outright, health officials instead required parents to sign a consent form so they could be alerted to the risks. But ultra-Orthodox Jewish leaders were still infuriated. The matter even became an issue in the mayoral campaign, with Christine C. Quinn defending the city’s policy and her Democratic opponents, including Anthony D. Weiner and John C. Liu, arguing that the Hasidic practice has stood the test of millenniums.

Hasidim have also been pressing public libraries in their neighborhoods to open on Sunday, just as the post office and banks now do, since they cannot patronize them on the Sabbath. But Brooklyn library officials refuse, pointing out that union contracts require expensive Sunday overtime.

If city officials feel they need to respond in full-throated fashion to Hasidic appeals, that is partly because the increasing sway of the city’s Hasidim has been nothing short of remarkable. The sparse remnants of Hasidic sects in Hungary, Poland and the Soviet Union were almost decimated by Hitler’s slaughter of the European Jews and arrived in New York after World War II in tiny numbers, barely enough to fill a sect’s single small yeshiva or room-size synagogue. But families have an average of six, seven and eight children, helping the sects replenish.