City officials warned parents are holding 'measles parties,' where they intentionally expose their unvaccinated children to an infected child in the mistaken belief that doing so is a safe way to create immunity.

'I understand that parents may be afraid of getting their children vaccinated,' said Oxiris Barbot, the city's health commissioner.

'I know that getting vaccinated is far safer than getting measles.

The measles outbreak in Brooklyn, primarily among Orthodox Jewish children, prompted New York City on Tuesday to declare a public health emergency, requiring unvaccinated people in the affected areas to get the vaccine or face fines of up to $1,000.

The city's largest outbreak since 1991 of the once virtually eradicated disease has mainly been confined to the Orthodox Jewish community in the borough's Williamsburg neighborhood, with 285 cases confirmed since October, Mayor Bill de Blasio said at a news conference.

That's up sharply from only two reported cases in all of 2017.

'This is the epicenter of a measles outbreak that is very, very troubling and must be dealt with immediately,' de Blasio said. He was joined by city health officials who decried what they called 'misinformation' spread by opponents of vaccines.

The measles virus is highly contagious and can lead to serious complications and death. While there have been no confirmed deaths so far, 21 people have been hospitalized, with five admitted to intensive care, officials said. All but 39 of the confirmed cases are in children.

Measles 'parties' stems from the once-popular trend of 'pox parties' - intentionally exposing children to chickenpox, before the Varicella vaccine was rolled out in 1995.

In an attempt to 'naturally' build up their kids' immunity to viruses, parents would get them all together, expose them to the virus, to get it over and done with.

Deliberately exposing a child to chickenpox comes with risks.

Exposing kids to measles is even more dangerous.

The virus can escalate into severe complications such as hard-to-treat bacterial infections, pneumonia and inflammation of the brain.

What's more, the more children in the community have it, the higher risk of exposure for kids with weakened immune systems and pregnant women, who need to avoid the virus.

These days, exposure parties are largely a thing of the past. The vaccine offers the same immunity boost without the ordeal of enduring the virus.

A dead or weakened form of the virus is injected into a child, stimulating antibodies to recognize the virus without making them sick.

But health experts are concerned by the booming number of parents in Brooklyn who are skeptical of vaccines.

The outbreak is part of a broader resurgence in the United States, with 465 cases reported in 19 states so far this year, according to the U.S. Centers for Disease Control and Prevention.

The United States declared measles eliminated from the country in 2000 thanks to widespread vaccination, meaning it is no longer constantly present. But vaccination rates have declined in recent years, according to infectious disease experts.

The Brooklyn outbreak has been traced to an unvaccinated child who became infected on a visit to Israel, which is also grappling with an outbreak, according to New York City's Department of Health.

Officials from the Department of Health will check vaccination records of anyone who has been in contact with infected patients in certain parts of Brooklyn, officials said.

They will impose fines of up to $1,000 on those who have not received the measles-mumps-rubella vaccine and cannot give other evidence of immunity, such as having previously had the measles.

It is the first time New York City has ordered mandatory vaccinations in recent history, according to health officials.

Community leaders and doctors welcomed the move.

'We will make sure that everybody who is allowed will be vaccinated,' Rabbi David Niederman, the president of the United Jewish Organizations of Williamsburg, said in a phone interview. 'The schools are cooperating, everyone's cooperating.'

He said he had seen misinformation circulate around the tightly knit community, but that most families trusted the Health Department.

'You get phony, phony articles and studies, so yes, some people will fall for that,' he said. 'They will do anything and everything to improve the health of their children.'

Doctors in affected communities said an anonymously produced anti-vaccine booklet targeting Orthodox Jews that contained false information had appeared in the mail over the last couple years, which had sown doubts and hesitancy among some parents.

'In general, the Orthodox community does immunize,' said Dr. Joseph Kaplovitz, who works at the NYU Langone Stepping Stones Pediatrics clinic in Brooklyn's Borough Park.

Dr Jeffrey Dick of Kindercare Pediatrics in Williamsburg said his practice had seen at least a dozen measles cases in recent months, but also an uptick in families seeking vaccinations as worry about the outbreak spread.

The mandatory vaccination order follows one from the Health Department last week requiring yeshivas and day-care programs serving Williamsburg's Orthodox Jewish community to exclude unvaccinated children or face fines or closure.

Another outbreak has hit Orthodox Jewish families in New York's Rockland County. Officials there banned children not vaccinated against measles from public spaces last month.

That order was overturned by a state judge on Friday, local media reported. The order is being appealed by Rockland officials.

Federal officials are also tracking outbreaks in New Jersey, California, Michigan and Washington state.

A growing and vocal fringe of parents oppose vaccines believing, contrary to scientific evidence, that ingredients in the vaccines can cause autism or other disorders.