NEW CITY, N.Y. (AP) — A state judge has issued a preliminary injunction against a suburban New York county's emergency order banning children from public places unless they've been vaccinated against measles.

Supreme Court Justice Rolf Thorsen ruled Friday in favor of several dozen parents challenging Rockland County Executive Ed Day's order, part of efforts to stop a measles outbreak that has infected 166 people since October.

The 30-day order enacted on March 26 bans unvaccinated people under 18 from gathering places including schools, stores and churches. Civil rights lawyer Michael Sussman called Day's action "arbitrary and capricious."

The judge said such emergency orders cannot exceed five days. He also noted that 166 measles cases in a population of 330,000 people over six months doesn't constitute an "epidemic" meriting an emergency declaration.