Alabama lawmakers on Wednesday passed legislation to shield in vitro fertilization providers from civil and criminal liability, capping off their scramble to allow the fertility treatment after a State Supreme Court ruling found that frozen embryos should be considered children.

Gov. Kay Ivey, a Republican, swiftly signed the bill into law.

Two major clinics said they were moving to restart treatments, possibly in the coming days, while another clinic said it was not assured about the scope of protections and would wait for “legal clarification.”

Lawmakers and legal experts acknowledged that the law did not address existential questions raised by the court about the definition of personhood, leaving open the prospect of legal challenges in the future.

The overwhelming vote of support — 81 to 12 with nine abstentions in the House and 29 to 1 in the Senate — came barely two weeks after the ruling. It demonstrated the intense urgency among Republicans to protect I.V.F. treatments, even if that meant sidestepping the thorny contradictions between their pledge to protect unborn life and fertility treatment practices.

“It’s happy tears, it’s a sigh of relief just because we know we are protected,” said Stormie Miller, a Hoover, Ala., mother who had twin girls through I.V.F. and has two remaining frozen embryos. Talking about the future of those embryos, she added, “We’re able to make that decision for ourselves and not have someone make that decision for us.”

Reproductive medicine in the state was thrown into turmoil by the court ruling, which applied to a group of families who filed a wrongful-death claim over the accidental destruction of their embryos at a clinic in Mobile in 2020. But the court’s interpretation of Alabama statute that frozen embryos should be considered children — coupled with an impassioned, theology-driven opinion from the chief justice — sowed fear about civil and criminal liability among doctors and clinics, and raised concern about the ramifications of other states taking a similar stance.