The California state legislature passed a controversial vaccination mandate Thursday requiring all schoolchildren receive vaccinations regardless of personal and religious beliefs.

The law would end the ability of parents to exempt their children from vaccination unless a serious medical reason is given. Unvaccinated children are required to be homeschooled.

Republican Assemblyman Rocky Chavez voted against the measure in the Assembly’s Health Committee, saying while he is pro-vaccination he feels the mandate violates California’s constitutional right to education.

“That’s an extremely high bar, to restrict somebody’s constitutional right,” he said in an interview with the Associated Press.

The issue was shot into national debate last December after a measles outbreak beginning at Disneyland in California spread to over 100 people in the U.S. and Mexico. Lobbyists on both sides of the issue have since made emotional appeals to lawmakers in attempt to push or prevent compulsory vaccination laws.

Seven-year-old Leukemia survivor Rhett Krawitt has become the anecdotal face for proponents of mandatory vaccinations. He is in remission from leukemia and cannot receive vaccination while he recovers from chemotherapy. His parents say his ability to recover depends on his classmates being vaccinated, arguing unvaccinated children put Rhett and children like him at serious risk.

“The social impact of not having children vaccinated is truly life-threatening for some,” Carl Krawitt, Rhett’s father, told The New York Times. “We can take personal freedoms to such an extreme.”

Only about 3 percent of children in California are not vaccinated, but there are disparities—in some schools about half of the students are unvaccinated, according to The New York Times. Rhett’s parents said his school is one of the under-vaccinated.

If Gov. Jerry Brown signs the bill into law, California will join West Virginia and Mississippi as only the third state barring religious exemptions from vaccination requirements, according to the National Conference of State Legislatures. The governor has not yet said whether he would approve the bill.

Opponents of the measure have pushed back against the mandatory requirements arguing choice should lie in the hands of the parent, not the state.

“There are large numbers of parents who are very concerned about the fact that we’re going to have mandated medical treatment against a fundamental right to education,” Christina Hildebrand, the founder of A Voice for Choice, told The New York Times. “Parental freedom is being taken away by this, because the fear of contagion is trumping it.”