New York City has ordered yeshivas in a heavily Orthodox Jewish section of Brooklyn to exclude from classes all students who aren't vaccinated against measles or face violations and possible closure.

The city health department's order to all yeshivas in Williamburg comes amid a measles outbreak, with 285 cases of the disease in Brooklyn and Queens since October, most of them involving members of the Orthodox Jewish community.

"Any school out of compliance will immediately be issued a violation," the health department said in a release Monday.

The outbreak started when an unvaccinated child acquired measles on a visit to Israel, where a large outbreak of the disease is occurring, the health department says on its website. "Since then, there have been additional people from Brooklyn and Queens who were unvaccinated and acquired measles while in Israel."

The vast majority of measles cases in Brooklyn and Queens are of children younger than 18 years, the release on Monday said.

Measles causes fever, cough, runny nose, red eyes and rashes and with complications, can cause swelling of the brain and death.

In December, the health department issued a mandatory directive that yeshivas and child care centers in parts of the Borough Park and Williamsburg sections of Brooklyn exclude students who had not received the measles, mumps and rubella (MMR) vaccine, the release said.

A month later, a yeshiva in Williamsburg fell out of compliance and allowed unvaccinated children back into school or child care. This single yeshiva is connected to more than 40 cases, the release on Monday said.

Debates in the Orthodox Jewish community over vaccinations stem from Torah teachings that followers should not cause the body any damage since it is a gift from God.

Rabbi Yehuda Shurpin, content editor for Chabad.org, wrote in a piece discussing vaccinations and Jewish law that "obviously, as in all cases, especially in regard to the health of children, one should consult one’s personal physician, a licensed medical doctor."

The piece explained that some see the small risks associated with vaccines and the risk of contracting diseases that have "been largely eliminated" as equal, and so subscribe to the Talmudic dictum that translates to “in some cases of doubt, better to sit and do nothing."

But Shurpin wrote, "One must do whatever is in their power to save oneself, one’s children, and others as well from possible life-threatening dangers."

Some other New York rabbis said the need to vaccinate children is "abundantly clear."

“It says in the Torah 'V'nishmartem Meod L'nafshoseichem,' that a person must guard their health,” Rabbi David Niederman of north Brooklyn said, according to a previous health department statement.

“It is abundantly clear on the necessity for parents to ensure that their children are vaccinated, especially from measles," he said.