A public health emergency was declared in New York City on Tuesday due to a measles outbreak — and health officials are warning against the idea of "measles parties."

Such parties involve intentionally exposing unvaccinated children to other children with a disease, with the intent that they would get the disease themselves. The Centers for Disease Control and Prevention (CDC) "strongly recommends against hosting or participating in these events."

NYC ORDERS MANDATORY VACCINATIONS FOR AREAS OF BROOKLYN AMID MEASLES OUTBREAK

"We are concerned about families having measles parties," New York City Health Commissioner Dr. Oxiris Barbot said at a news conference, emphasizing that "we live in a different world now."

"There are many more individuals who are living with chronic diseases, who are surviving cancer, and so we don't want children or adults to be unnecessarily exposed to measles" due to "measles parties," she told reporters.

The health order that was declared on Tuesday covers people who live in four ZIP codes in the Williamsburg neighborhood of Brooklyn, where more than 250 people have contracted measles since September.

All unvaccinated people in those areas who may have been exposed to the virus are required to get vaccinated, including children older than 6 months, according to the order. Those who didn’t get the vaccine or are not immune to the virus may be fined $1,000.

200 PATIENTS WARNED OF POSSIBLE MEASLES EXPOSURE VIA ONE LITTLE GIRL IN CALIFORNIA ER

The health commissioner said that "nearly all" measles cases in New York City have been associated with the Orthodox Jewish community in Brooklyn, and the outbreak is the largest since 1991.

Barbot said that the majority of religious leaders in the large Orthodox communities support vaccination efforts, but that rates have remained low in some areas because of a resistance "fueled by a small group of anti-vaxxers in these neighborhoods."

KENTUCKY GOVERNOR SAYS HE INTENTIONALLY EXPOSED HIS 9 KIDS TO CHICKENPOX

Earlier this week, the city ordered religious schools and day care programs serving that community to exclude unvaccinated students or risk being closed down.

In the city alone, 285 cases have been confirmed — 246 of which have been in children. Barbot said that 21 people have been hospitalized, and five have ended up in the intensive care unit.

CLICK HERE TO GET THE FOX NEWS APP

When questioned whether an order to vaccine people was legal, Mayor Bill de Blasio said yes, noting his office is "absolutely certain we have the power to do this."

The measles vaccine, which the CDC recommends children get two doses of, is 97 percent effective, according to health officials. Called MMR, it protects against measles, mumps and rubella.

Fox News' Ryan Gaydos and The Associated Press contributed to this report.