California lawmakers are moving forward with a bill that would bar most parents from seeking vaccination exemptions for their kids, months after an outbreak of measles at Disneyland put a spotlight on the state’s problematic vaccination rates. The proposed law, which passed the state Senate on Thursday, would prohibit parents from forgoing vaccinations for their children based on religious or personal beliefs, according to the San Jose Mercury News.

Senators voted 25-10 in favor of the bill, Senate Bill 277. "This is a matter of public safety,” Democratic Sen. Richard Pan, the bill’s author, said during his remarks before the Senate, according to KCRA-TV. “This is a matter of protecting our communities.” For the most part, the vote followed partisan lines, with Democrats voting to approve the law, and Republicans arguing that it infringes on religious beliefs. The bill is expected to go to the legislature’s lower house, the California State Assembly, for another round of hearings.

California is not among the states with the lowest vaccination rates in the country, but pockets of so-called anti-vaxxers – parents who opt out of vaccinations – have posed a public health problem, officials have said. “Vaccines are necessary to protect us, but that protection has been eroding,” Pan said.

Supporters of the bill said its purpose was to boost immunization rates in communities that had dropped below the “herd immunity” threshold – the number of people who need to be vaccinated against a particular disease in order to avoid outbreaks. The proposed law would require all children entering kindergarten to be vaccinated for measles, mumps and rubella; it would allow medical exemptions for some children.

The measles outbreak linked to Disneyland sickened 134 Californians between Jan. 1 and May 1, 2015. Nineteen other states have reported measles cases this year.