This story has been updated.

A federal judge denied a temporary injunction on Thursday that would have allowed unvaccinated children to return to the Green Meadow Waldorf School, saying the county's "unprecedented measles outbreak," warranted the "stay home" order.

A group of parents had sued the Rockland County Department of Health over an order barring unvaccinated students from attending school since the county's measles outbreak.

“We have had success, but this case is not over," said Rockland County Attorney Thomas E. Humbach. "We are thankful that at this juncture we were able to establish to U.S. District Court Judge Vincent Briccetti that the county’s interest in protecting the public health was the highest priority and will remain so."

" While no one enjoys the fact that these kids are out of school these orders have worked; they have helped prevent the measles outbreak from spreading to this school population. We will continue to press forward to protect the public health as that is the primary objective of the government," he added.

The lawsuit, filed by more than 20 parents, sought an injunction to terminate an order by Rockland County's Department Of Health Commissioner Dr. Patricia Ruppert, which excludes unvaccinated children from attending certain schools following a measles outbreak in the county that has affected some 145 people.

The parents who filed the suit are mostly from Green Meadow Waldorf School in Chestnut Ridge whose children have not been able to attend school since December.

The lawsuit stated that Ruppert's order violates the families' religious objections to vaccinations, and it not warranted because there has bee no cases of measles among the excluded children, their families or the Fellowship Community connected with the school.

In addition, the suit says the measles cases have largely been spreading among the Hasidic Jewish communities.

Humbach said the order was enacted in consultation with epidemiolocal experts from the state and that students from the Green Meadow school were not singled out as the order covers all unvaccinated students at any school in the 10952 and 10977 zip codes that have not reached a 95 percent vaccination rate.

According to the order, the exclusions will end when there are no new cases of measles in that area for 21 days, Humbach said. But that order may be increased to 42 days due to continuing cases.

The judge told the parents' lawyer, Michael Sussman, that he might have better success in state court.

Click here to sign up for Daily Voice's free daily emails and news alerts.