NEW CITY, N.Y. — Some parents who had resisted having their children vaccinated reluctantly brought them in for a measles shot Wednesday as a state of emergency took effect in a county in New York City's northern suburbs.

Rockland County enacted the emergency order Tuesday night to fight a measles outbreak that has infected more than 150 people since last fall. The order bans unvaccinated children under 18 years old from public places such as schools, stores and churches.

Loreen Costa told the Rockland Journal News she brought her son to his pediatrician for a vaccination Wednesday after getting a robocall from his school explaining the ban. School districts contacted parents of unvaccinated children and told them not to attend classes Wednesday.

Lainie Goldstein of Grandview said her son's middle school principal called her and said the boy can't attend school until he's vaccinated. She said she had chosen not to vaccinate him because she did "not want to injure" him, but she brought him to the pediatrician Wednesday for the injection.

"I feel like I am being bullied right now to go get vaccinations," she told the Journal News.

About 30 people got measles vaccinations at a free county clinic Wednesday.

"I think that something needs to be done that has to be very drastic, that people need to comply and we've got to stop this," said Rockland resident Renee Kahan, who stopped by the clinic for a booster shot. "This outbreak is serious."

The emergency order, which lasts for 30 days, was enacted because people weren't cooperating with health officials working to stop the outbreak, said Rockland County attorney Thomas Humbach.

Humbach said police won't be stopping people and asking for vaccination records. But if officials become aware that an unvaccinated person has been in a public place, law enforcement will get involved, he said. Violators could be charged with a misdemeanor punishable by up to six months in jail.

Gary Siepser, CEO of the Jewish Federation and Foundation of Rockland County, said the disease's spread was related to the anti-vaccine movement across the country.

"It has found its way through social media and confused parents and confused people about the importance of vaccination," Siepser said. "And it just happens that there's a group in Rockland County that has bought into that."