After the school barred her daughter, Ms. Check home-schooled her and then moved her to a private school that accepted her daughter without the vaccinations. State vaccination requirements cover public and private schools, but in New York City, private schools have more autonomy in handling exemptions.

Ms. Check said she rejected vaccination after her daughter was “intoxicated” by a few shots during infancy, which she said caused an onslaught of food and milk allergies, rashes and infections. Combined with a religious revelation she had during the difficult pregnancy, she said, the experience turned her away from medicine. Now she uses holistic treatments.

“Disease is pestilence,” Ms. Check said, “and pestilence is from the devil. The devil is germs and disease, which is cancer and any of those things that can take you down. But if you trust in the Lord, these things cannot come near you.”

In turning down all three families, Judge Kuntz cited a 1905 Supreme Court ruling that upheld a $5 fine for a Massachusetts man who disobeyed an order to be vaccinated during a smallpox outbreak, a case that helped establish the government’s right to require immunizations as a matter of public health.

Ms. Finn, the families’ lawyer, said that case should not be relevant. “There’s no way that court anticipated that children would be subjected” to the vaccines they must get today, she said.

In New York, the statewide mean religious exemption rate rose over the last decade, from .23 percent in 2000 to .45 percent in 2011, a 2013 study in the medical journal Pediatrics said.

New York City schools granted 3,535 religious exemptions in 2012-13, according to data from the state’s Health Department. Though city schools, public and private, have an overall immunization rate around 97 percent, according to the department, 37 private schools were below 70 percent. Health experts believe that above a certain immunization rate, outbreaks are limited because a disease cannot spread to enough people during its incubation period to sustain itself, a phenomenon known as “herd immunity.” For measles, which is highly contagious, that rate is believed to be 95 percent, according to Daniel Salmon, deputy director at the Institute for Vaccine Safety at the Johns Hopkins Bloomberg School of Public Health.