A federal judge on Friday refused to block a California law tightening vaccination requirements for schoolchildren in the state.

The ruling came in response to a lawsuit by parents and health and education-related nonprofits, challenging the law at the beginning of the first school year in which it was to go into effect.

The measure eliminated the so-called personal beliefs and religious exemptions from California’s school vaccination law, meaning that only children with a valid medical excuse could forego vaccinations for such childhood diseases as measles and polio.

ADVERTISEMENT

The lawsuit, filed in U.S. District Court in San Diego last month, asked for an injunction to stop the requirements from going into effect, but Judge Dana Sabraw ruled that state legislatures have a “long history of requiring children to be vaccinated as a condition to school enrollment,” and not allowing personal or religious exemptions.

“In this case, plaintiffs have not made a showing that they are entitled to the extraordinary remedy of a preliminary injunction,” Sabraw wrote in the 18-page ruling.

Carl Lewis, a San Diego-based attorney for the plaintiffs, could not be immediately reached on Friday.

The bill was signed into law in June 2015 by Democratic Governor Jerry Brown and requires pupils to be vaccinated against childhood diseases unless they have a medical reason to refuse. It was passed after a measles outbreak among unvaccinated people at Disneyland in 2014.

The law, which went into effect this year, made California the third state to eliminate religious and other personal exemptions to vaccinations. It sparked determined protests by parents who believe that vaccinations can be harmful to children and religious groups that did not wish to see their exemption eliminated.

ADVERTISEMENT

(Reporting by Curtis Skinner in San Francisco, editing by G Crosse)