NEW CITY, N.Y. (CBSNewYork) — A courtroom fight has broken out over the measles emergency order in Rockland County.

Opponents say the county executive’s ban on unvaccinated minors in public should be overturned, CBS2’s Tony Aiello reported Thursday.

“It violates several constitutional provisions,” lawyer Patricia Finn said.

Finn represents a Jewish family that for religious reasons did not vaccinate its children. Those youngsters are now barred from schools and public places, thanks to County Executive Ed Day’s March 26 emergency order.

MORERockland County Offering More Measles Vaccines For Free

(credit: Justin Sullivan/Getty Images)

It was part of Rockland’s unprecedented effort to prevent the spread of the highly contagious measles. There have been 166 confirmed cases since October.

But with only a relative handful of current active cases — centered in the ultra Orthodox community — Finn said the order is unnecessary and should be overturned.

“This executive order in invalidating the religious exemption and is having a huge financial impact on families that now have to home school their kids,” Finn said.

MORERockland Measles Outbreak At Center Of Dispute Between 2 School Districts Over Postponed Baseball Game

New York families can claim a religious exemption from vaccination rules. And now, some lawmakers want to eliminate that exemption, as California did in 2015.

“You’re right to express your sincerely held belief or your religious belief does not extend to the right to endanger our children and our community from measles,” said state Sen. David Carlucci, who represents the 38th District.

Late Thursday, Judge Rolf Thorsen heard arguments against the emergency order.

One lawyer called the emergency order “a perversion” that is “preventing innocent people from public interaction.”

The county attorney said the order is not arbitrary or capricious, and if the outbreak becomes an epidemic the costs of treating it would be enormous.

The judge will rule on a request to lift the order on Friday.