California Governor Jerry Brown signed a mandatory school vaccination bill into law Tuesday, abolishing the “personal belief” exemption that many parents use as a loophole to avoid vaccinating their children.

Now, under California law, which is among the strictest in the country, children would not be able to enroll in public school unless they have been vaccinated against diseases like measles and whooping cough. The law includes an exemption for children who have a medical reason to remain unvaccinated (like an immune system disorder) and can prove it with a doctor’s note. Parents who decline to vaccinate their children for personal or religious reasons will have to home-school them or send them to a public independent study program off school grounds.

Students who are unvaccinated because of “personal belief” who are already in public elementary school can stay until they’re in 7th grade, and then the parents will either have to vaccinate them or home-school them. Daycare students can stay until kindergarten, when they have to be either vaccinated or home-schooled. In the fall of 2014, almost 3% of California kindergartners were unvaccinated because of personal belief. Preschools in the most affluent areas are also the least likely to vaccinate, according to the Los Angeles Times.

The bill was proposed after a measles outbreak at Disneyland infected more 150 people, and many needed to be hospitalized. Supporters of the law argue that it is based on medical consensus that vaccinations improve public health. Opponents—who have been picketing outside the California legislature—argue that it’s an attack on personal freedom.

Get our Health Newsletter. Sign up to receive the latest health and science news, plus answers to wellness questions and expert tips. Please enter a valid email address. Sign Up Now Check the box if you do not wish to receive promotional offers via email from TIME. You can unsubscribe at any time. By signing up you are agreeing to our Terms of Use and Privacy Policy . This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply. Thank you! For your security, we've sent a confirmation email to the address you entered. Click the link to confirm your subscription and begin receiving our newsletters. If you don't get the confirmation within 10 minutes, please check your spam folder.

Write to Charlotte Alter at charlotte.alter@time.com.