California Gov. Jerry Brown signed a bill Tuesday aimed at ending immunization exemptions in the state based on religious or personal beliefs, a controversial measure considered one of the strictest mandatory vaccination bills in the country. The state passed the measure, which requires children entering public school to be fully vaccinated against such infectious diseases as measles and rubella, in the wake of a measles outbreak linked to Southern California’s Disneyland theme park that sickened dozens of people.

“The science is clear that vaccines dramatically protect children against a number of infectious and dangerous diseases,” Brown wrote. “While it’s true that no medical intervention is without risk, the evidence shows that immunization powerfully benefits and protects the community.”

The state Senate passed Senate Bill 277 on Monday, four days after the Assembly approved it. The bill moved forward despite protests from some California parents who said the law violated their parental rights. Advocates of the measure, however, said it was about protecting the population from outbreaks. Two-thirds of Californians said they thought children should not be allowed to attend public schools unless they were immunized.