Religious objections to vaccines do not trump public health concerns and are not constitutionally protected, according to a federal judge in Brooklyn.

The New York Times reports Judge William F. Kuntz ruled against a group of parents who sued the city for turning their unvaccinated children away from public school during outbreaks of contagious diseases like measles.

The ruling upholds a New York City policy that bans unvaccinated students from public school when a classmate has a vaccine-preventable disease. Judge Kuntz wrote in his ruling that the Supreme Court has “strongly suggested that religious objectors are not constitutionally exempt from vaccinations.”

Raw Story reports the suit is a consequence of the city’s efforts to combat resurgent childhood diseases, which are beginning to flourish again, thanks to anti-vaccine parents who believe that the medicines can hurt their children or that they are contrary to God’s laws.

The original suit was brought by three sets of parents claiming their federal constitutional right to free exercise of religion was violated by the policy. One of the parents, Dina Check, said:

“Disease is pestilence, 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.”

Judge Kuntz’s ruling drew from a 1905 Supreme Court ruling that upheld the state of Massachusetts’ right to fine a citizen $5 for refusing to be vaccinated against smallpox.