Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

A student who contracted measles has infected 21 other people with ties to a Jewish school in New York City, according to health officials. The incident comes amid a measles outbreak in Brooklyn that has sickened more than 100 people.

The New York City Department of Health and Mental Hygiene says 133 cases of measles have been reported since the outbreak began in October.

The majority of the people infected reside in the Brooklyn neighborhoods of Borough Park and Williamsburg.

The first case reported was a child who was unvaccinated and contracted measles while on a trip to Israel, according to the health department.

In December, the health department issued a mandatory directive that schools in selected zip codes in Borough Park and Williamsburg exclude students who had not received the measles, mumps and rubella (MMR) vaccines.

But the Yeshiva Kehilath Yakov in Williamsburg "went out of compliance" and allowed an unvaccinated student with measles to attend school, according to the health department.

Twenty-one of the 87 confirmed measles cases in Williamsburg "are connected to" the school, the health department said. Yeshiva Kehilath Yakov is now "working with the health department to prevent further exposures," health department spokesman Michael Lanza told NBC News on Friday.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

“The increase in measles cases in Orthodox Jewish communities of Brooklyn demonstrates the importance of getting children vaccinated on time to prevent measles and not put other children at risk,” acting Health Commissioner Dr. Oxiris Barbot said in a statement.

The health department has been spreading the word about the MMR vaccine in Orthodox Jewish communities by reaching out to health care providers and schools, putting ads in newspapers and handing out literature, the department said.

"There has been an increase in vaccination rates in these communities since the Health Department announced the outbreak, but many more children should receive the MMR vaccine to stop measles transmission," according to the department.

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 health department statement.

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

Rabbi Avi Greenstein, executive director of the Boro Park Jewish Community Council, said "we need to take away the lesson of how important it is for every one of us to avail ourselves of modern medicine and not to trust in herd immunity, but rather to follow the vaccination schedule recommended by medical professionals to protect our families and our entire community.”

Measles causes fever, cough, runny nose, red eyes and rashes and with complications, can cause swelling of the brain and death, according to the New York City Department of Health.

The virus is highly contagious and remains that way on surfaces for two hours. Symptoms usually don't present until 10 to 12 days after a person is exposed.

The New York City outbreak has not led to any deaths, but 10 people have been hospitalized, including one who was in the intensive care unit but has since recovered.

On the other side of the country, 71 measles cases have been confirmed in Clark County, Washington.