New York is set to eliminate the religious exemption allowing parents to prevent their children from receiving vaccinations, after the state Legislature voted to remove the exemption during a contentious day at the state Capitol on Thursday.

The bill was signed almost immediately by Gov. Andrew Cuomo, who had said earlier this week that he supported the measure. The new law takes effect immediately.

State Sen. Brad Hoylman, D-Manhattan, and Assemblyman Jeffrey Dinowitz, D-Bronx, have worked in recent months to convince their colleagues to back the measure after an outbreak of measles in areas of Rockland County and New York City emerged earlier this year.

“We are dealing with a public health emergency that requires immediate action,” Hoylman said Thursday. “The question of public safety is at issue.”

It was almost in danger of not passing Thursday when it failed to initially gain support from a majority of members in the Assembly Health Committee. Assemblyman Nader Sayegh, D-Westchester, changed his vote at the last minute, which allowed the bill to go to the floor.

But even after it came before the entire chamber, Democrats remained split on the measure. Some argued that parents should have the choice whether to vaccinate their children. Others were concerned the bill could be interpreted as unconstitutional.

“It's not about vaccines at all. It's about religious rights,” said Assemblyman Thomas Abinanti, D-Westchester. “It's about whether New York state, which for years has protected religious rights, will take the drastic step of removing from our statutes New York's implementation of our Constitution's First Amendment.”

Abinanti was one of more than a dozen Democrats in the Assembly who voted against the measure, which passed the chamber by a razor-thin margin of 77 votes in favor, two above the threshold for passage. The State Senate later approved the bill by a 36-26 vote.

The legislation would not force anyone to vaccinate their children. It would, instead, prohibit parents from claiming a religious exemption to vaccines in order for their children to attend school or day care in New York. Parents could forgo vaccinations, but their children would be barred from attending day care or school, regardless of whether it's a public or private institution.

Dinowitz, who sponsors the bill, said during the floor vote that some have misinterpreted it to mean that parents would be required to vaccinate their children, regardless of whether they attend school or not. That's not true, he said.

“No, no one would be forced to vaccinate,” Dinowitz said. “Some have said that, but that's not the case.”

Medical exemptions to vaccine requirements would remain in place, though opponents of the legislation have said those are hard to come by. The bill is intended to prevent parents from claiming a religious exemption to vaccines when their reasoning has nothing to do with religion.

Opponents of the legislation have vowed to front a legal challenge when it becomes law, though Cuomo's office and the bill's sponsors remain confident that it would survive judicial review. Alphonso David, counsel to the governor, said Wednesday that his office has reviewed the legislation and found it to be airtight against litigation.

“We've reviewed the bill carefully, we've spoken to [Sen.] Brad Hoylman and the sponsor in the Assembly,” David said. “We believe this current iteration would survive a challenge.”

Hoylman, who sponsors the bill in the Senate, has argued that the legislation's constitutionality is supported by case law, some of which is more than a century old.

The U.S. Supreme Court in Jacobson v. Massachusetts, decided in 1905, held that Massachusetts' compulsory vaccination law was a lawful exercise of its police power to protect public health and safety and therefore didn't violate the plaintiff's 14th Amendment liberty interest.

A different case, decided only a few years ago, was brought by a group of parents who challenged New York's requirement to have their children vaccinated in order to attend public school. They had applied for religious exemptions but were either denied or were subject to a different section of state law that prohibited them from being in school unvaccinated.

The U.S. Court of Appeals for the Second Circuit said, in a decision on the case in 2015, that not only was the state's law constitutional, the Legislature could go further if it wanted to.

“New York could constitutionally require that all children be vaccinated in order to attend public school,” the appellate court wrote. “New York law goes beyond what the Constitution requires by allowing an exemption for parents with genuine and sincere religious beliefs.”

Advocates rallied with their children at the Capitol hours before the measure was approved by either chamber on Thursday, and even attended the committee meeting where the bill moved. As members of the Assembly cast their vote to approve the bill, one still seemed confident they could roll back the legislation in the future.

“We'll be back,” the advocate said. “This isn't over.”

READ MORE: