The Connecticut House of Representatives passed a contentious bill early Tuesday that would end the state’s long-standing religious exemption from immunization requirements for schools, beginning with the 2022 school year.

The 90-53 vote in the Democratic-controlled chamber came just before 3 a.m. after more than 16 hours of debate. The bill now heads to the Senate, which is also controlled by Democrats.

About a half-hour before approving the legislation, lawmakers passed an amendment that would allow students who are now exempt from immunizations because of religious reasons to continue to be exempt.

The House approval was largely among party lines, with heavy opposition from Republicans.

Democratic Gov. Ned Lamont said Monday he’s ready to sign the bill into law.

“We have learned over and over again over the last six months that vaccinations work, vaccinations keep me safe, keep you safe, keep my classrooms safe and prevent replications of other variants out there,” he said. “So it’s really important.”

The legislation stems from an uptick in the number of families in Connecticut who have sought a religious exemption from a host of childhood vaccinations, ultimately lowering the vaccination rate in as many as 100 schools at one point to under 95%. Meanwhile, earlier this month, the Department of Public Health reported that an unvaccinated child from Fairfield County contracted measles while traveling internationally.

Rep. Jonathan Steinberg, D-Westport, co-chair of the General Assembly’s Public Health Committee, said “it’s reasonable to assume” many parents are using the state’s religious exemption because they’re concerned about vaccine efficacy and safety.

“It’s a belief, even if it’s not a specific religious one. But it’s a problem, a growing problem,” he said. “Vaccine hesitancy is becoming a direct and serious threat to the public health. It demands a proactive approach, not a reactive one. … We need to act and act before we have an epidemic, an epidemic that we can prevent.”

Roughly 7,600 children in grades K-12 currently have religious exemptions in Connecticut.

Connecticut is currently one of 45 states with a religious exemption from childhood vaccinations. The medical exemption will remain in place available for families.

This marks the third year in a row Connecticut lawmakers have considered removing the religious exemption for vaccinations. It’s been an emotionally charged debate. Both legislators who support and oppose the legislation have reported receiving hostile emails and social media posts over the issue.

This year, nearly 2,000 members of the public signed up in February to testify at an unprecedented 24-hour, virtual legislative hearing on the issue. Many, including parents concerned about the safety of vaccines, argued that stripping the exemption will infringe on their religious and parental rights and on their child’s right to a public education.

“I would never vaccinate my children. That is a hill I will die on,” testified Rachael Butova, a parent who said she in February she was considering moving out of the state because she keeps having to “defend” her 1st Amendment rights.

The legislation would take effect on Sept. 1, 2022.

House Minority Leader Vincent Candelora, R-North Branford, predicted the legislation will be challenged in court if it ultimately becomes law, noting there’s a right to a public education under the state constitution.

He said lawmakers have heard from many parents who have had difficulty getting a medical exemption for their children from vaccinations and have had no choice but to get a religious exemption. Other lawmakers said the legislation is unfair to families who may have concerns about one vaccine their child is supposed to receive.