The California Senate Thursday approved a controversial bill that would abolish the personal belief exemption and require almost all children enrolling in daycare or school to be vaccinated.

Legislators voted 25 to 10 in favor of SB 277, which would eliminate parents' option to not vaccinate their children due to philosophical or religious beliefs. It would retain an exemption for kids who can’t be immunized for medical reasons.

The legislation now moves on to the state Assembly. If it becomes law, California will become the 32nd state to ban the personal belief exemption, and the third state to ban the religious exemption.

Senators voted to set aside amendments introduced by Republican senators, including one by Sen. Mike Morrell (R-Rancho Cucamonga) that sought to reinstate the religious exemption. The Senate also tabled an amendment offered by Sen. Joel Anderson (R-Alpine) that would have required disclosure of a vaccine's contents to a child's parents before immunization. Anderson is concerned that some vaccines contain cells from aborted fetuses.

Senators Dr. Richard Pan (D-Sacramento) and Ben Allen (D-Santa Monica) introduced SB 277 following the measles outbreak that began at the Anaheim Disney theme parks in December. By the time the state health department declared the outbreak over in April, 131 Californians had contracted the disease. Experts say the highly contagious disease was able to spread due to low vaccination rates in some communities.

The goal of the bill, the authors say, is to boost vaccination rates to protect students and communities from future outbreaks, and to protect the health and educational rights of kids who can't be vaccinated.

The bill has met heavy resistance. Thousands of people traveled to Sacramento to oppose the bill as it made its way through the Senate Health, Education and Judiciary committees. They either oppose vaccination outright or don't want to follow the vaccination schedule laid out by the Centers for Disease Control and Prevention.

Many said the bill would infringe on their parental rights. The American Civil Liberties Union of California raised concerns that the bill would violate the state constitution's guarantee of access to public education for all.

In response to these concerns, Pan and Allen have amended the legislation in several ways. The bill now states that parents who choose to not vaccinate their children can participate in a multiple-family private home school, or home school their kids using a public school independent study program.

The authors also removed the only element of the bill that would have come with a cost to the state: A requirement that school districts notify parents of school immunization rates. With this change, the bill bypassed a hearing in the Senate Appropriations Committee.

During the debate on the Senate floor Thursday morning, Sen. Anderson questioned why the bill was removing the religious exemption to vaccinations. He asked, "why is it that a religious exemption is so scary to this Senate body?"

Allen responded, explaining that he called several religious leaders and asked if they had concerns about vaccinations.

"I was consistently told that the Catholic Church does not have an opposition to vaccinations," Allen said. "In fact, many Catholic priests are working very hard in other parts of the world to vaccinate children and people to protect them from dangerous communicable diseases, as a matter of faith for them, because they care so much about the sanctity of life and the preservation of human health."

Only Mississippi and West Virginia do not allow for a religious exemption. Attempts to eliminate the personal belief exemption in Washington and Oregon failed earlier this year.

This story has been updated.