Leaders in a New York county are weighing legal options after a judge ruled Friday against banning unvaccinated children from public places as a way to prevent the measles outbreak in Rockland County from spreading.

Rockland County enacted the emergency order last month to fight the measles outbreak that, as of Friday, has infected 167 people since October, according to the County’s health department. The 30-day declaration barred unvaccinated children from schools, houses of worship and other public areas and the ban included children with a religious exception.

In ruling against the declaration, acting Supreme Court Justice Rolf Thorsen decided in favor of several dozen parents challenging Rockland County Executive Ed Day’s order, according to the New York Post. The parents challenging the emergency order said it violated their First Amendment right to exercise their freedom of religion. Thorsen said the county’s measles outbreak didn’t rise to the level of an “epidemic” meriting an emergency declaration.

JUDGE DENIES REQUEST FOR UNVACCINATED CHILDREN TO RETURN TO NY SCHOOL AMID MEASLES OUTBREAK 

Rockland County officials disagree with Thorsen's ruling and are meeting with legal and health professionals Monday to “identify potential new strategies” to address the outbreak.

In a statement sent to Fox News, Day said, “My Administration refuses to sit idly by while those in Rockland are put at risk.”

He added, “It is unacceptable to the health of all in our County and we will do everything in our power to ensure the public health of Rockland is strong and vital.”

According to health officials, the number of U.S. measles cases through the first three months of this year have surpassed the count for all of 2018. There have been 387 cases of measles through March of 2019 compared to 372 cases reported for all of last year, according to the Centers for Disease Control and Prevention.

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

This year's numbers have been driven by outbreaks in several states, including New York, California, Texas, Illinois and Washington.

Measles is spread through the air when an infected person coughs or sneezes, and it is extremely contagious. Health officials said most people who contract measles have not been vaccinated. The measles vaccine is 97% effective, according to the CDC.

CLICK HERE TO GET THE FOX NEWS APP

The most common symptoms include fever, runny nose, cough, and a rash all over the body. However, a very small fraction of people can suffer complications like pneumonia and swelling of the brain.

The Associated Press contributed to this report.