Parents of unvaccinated children in Rockland County are now suing the local government to repeal an emergency order prohibiting their children from visiting indoor public spaces.

Last week, County Executive Ed Day declared a state of emergency that banned unvaccinated minors from shopping malls, restaurants, and other gathering places unless they had medical reasons for forgoing the vaccine. He said it was an effort to stop the spread of measles, which has so far infected 161 county residents.

In two cases filed Wednesday in State Supreme Court in the Rockland County hamlet of New City, attorneys for the unnamed parents alleged the county executive overstepped his powers in an “arbitrary and capricious” manner.

The attorneys cited a New York state statute, Executive Law 24, which permits local governments to impose restrictions on movement or put curfews in place in the event of a “disaster, rioting, catastrophe or similar public emergency.”

Attorney Michael Sussman, who represents a group of around 30 parents, argues that the current measles outbreak — just a handful of active measles in the last week — isn’t sufficient grounds to call for a state of emergency.

“There’s been a bungling of the situation by Rockland County for now six months and Rockland County,” he said in an interview. “Instead of dealing with the actual public health issues involved, which are most directly dealt with through the quarantining of affected people and those close to them — rather than doing that, they’ve made a wholesale effort to punish people who have legitimate religious exemptions.”

So far, Rockland officials have said most of the confirmed cases have been found in Orthodox Jewish enclaves.

Listen to Gwynne Hogan discuss the lawsuit on WNYC's Morning Edition:

New York state requires all children to get vaccinated for measles and some other diseases before attending public or private kindergarten. But like most other states, it permits parents to request an exception for religious reasons, a law that’s been on the books since 1966. However, in light of the current outbreaks in Rockland as well as in Brooklyn, State Senator Brad Hoylman has sponsored a bill to eliminate the religious exemption, as California did in 2015 in response to a large measles outbreak that was traced back to exposure at Disney Land.

A separate lawsuit filed by attorney Patricia Finn on behalf of an unnamed parent argues the county executive’s motive was to, “increase vaccination rates in Rockland County to a 100% threshold of vaccination compliance for all children,” in court papers.

County officials have repeatedly said they do not plan to enforce the prohibition, but imposed it in order to publicize the dangers of measles and prompt parents to vaccinate their children. The 30-day order is set to expire at the end of April.

On Thursday, county health officials said they had confirmed 161 cases of measles since Octoberjust five in the past week — though they have said they think many other cases have gone unreported.

Experts on public health law have differing opinions about the legality and constitutionality of Rockland County’s ban.

“Do I think it's the right approach? No, I think it's the wrong approach”, said Janlori Goldman, who teaches public health law and social justice professor at Columbia and NYU Law Schools. “I think It's frightening. It's coercive and I think it's overstepping.”

But, she added, “I also want to say it’s constitutional in my view.”

Goldman points to the 1905 Supreme Court decision in Jacobson v. Massachusetts, where the court case upheld the state’s mandatory vaccination rule during a smallpox outbreak. The government has been consistently alloted broad powers when it’s deemed to be in the interest of public health, she said.

But Lawrence Gostin, a Georgetown University law professor and the director of the World Health Organization's Center on Global Health Law, had a different view. He said that when it comes to public health, the ends don’t justify the means.

“You can't deprive a person of liberty unless they're in imminent serious danger. And an unvaccinated child is not a child who has measles or some other infection,” he said. “Public health agencies — and I'm a very big supporter of them — need to operate in ways that are both lawful and ethical and in my mind this order is neither lawful nor ethical.”

Extreme bans like Rockland County’s have been used in the past to try to quash the spread of disease. During polio epidemics during the first half of the 20th century, children were often banned from congregating at theatres, ball games or libraries, whether or not they were sick. But legal experts say those bans were never legally challenged.

Public health officials argue there is a scientific basis for prohibiting unvaccinated children in public places. Measles is extremely contagious, and takes up to 12 days to exhibit symptoms. Non-immunized individuals are likely to catch it if they come in close proximity with an infected person, and it may result in pneumonia, encephalitis or even death.

Since the outbreak began in October, Rockland health officials have identified numerous exposure sites that contagious individuals visited, and may have spread the virus to others, such as a Target, supermarkets, and a clothing store. They have argued that restricting movement of unvaccinated children was the next step.

Rockland County attorney Thomas Humbach declined to comment before a judge hears arguments in the lawsuit, which was expected to happen later Thursday or Friday.

Gwynne Hogan is an associate producer at WNYC. You can follow her on Twitter at @GwynneFitz.