ALBANY, N.Y. (AP) — New York state enacted one of the nation's strongest protections for abortion rights Tuesday, a move that state leaders say was needed to safeguard those rights should the U.S. Supreme Court overturn Roe v. Wade.

The Democrat-led Senate and Assembly passed the bill Tuesday, the 46th anniversary of the Roe decision. Democratic Gov. Andrew Cuomo immediately signed it into law. At his side at a hastily arranged signing ceremony was Sarah Weddington, the Texas attorney who successfully argued Roe before the nation's highest court.

"Thank you for what you've done for women," she told Cuomo and the assembled lawmakers and advocates who worked for years to pass the bill.

Known as the Reproductive Health Act, the measure replaces a 1970 state abortion law that was passed three years before Roe legalized abortion nationwide. It codifies many abortion rights laid out in Roe and other court rulings, including a provision permitting late-term abortions when a woman's health is endangered. The previous law, which was in conflict with Roe and other subsequent abortion rulings, only permitted abortions after 24 weeks of pregnancy if a woman's life was at risk.

The new law also authorizes physician assistants to perform some abortions and moves the section of state law dealing with abortion from the penal code to health statutes.

Nine other states including California, Washington and Oregon have already put protections for abortion rights in their state statute, giving them a legal backstop should Roe be overturned.

Abortion rights supporters had pushed for years to update the law to reflect those rulings only to be blocked in the state Senate, long controlled by Republicans. But big election gains put Democrats in charge of the Senate this year, and the act easily cleared both chambers. Supporters said the election of Republican President Donald Trump — and his nomination of conservative justices — helped galvanize the effort.

"We have a president who has made it very, very clear that he wants to overturn Roe v. Wade," said the Senate's new leader, Democrat Andrea Stewart-Cousins of Yonkers, who vowed to make the bill an early priority in 2019. "Today in New York we are saying 'No. Not here in New York.'"

Opponents lamented the enactment of the act, which some predicted would lead to an increase in late-term abortion. Others argued that the new law could make it harder for prosecutors to bring charges when a woman is assaulted and loses her pregnancy.

"Today, New York state has added a sad chapter to this already solemn date of January 22, the anniversary of Roe v. Wade," the state's Catholic bishops said in a statement.

Republicans in the Senate tried to derail the bill and offered up proposals to create new legal penalties for harming a pregnant woman. They were joined at a press conference Tuesday morning by Livia Abreu, an Army veteran and Bronx resident whose ex-boyfriend stabbed her last year, ending her 26-week pregnancy. The man faces multiple charges, including violations of the state's 1970 law. Abreu said repealing the law would tie the hands of prosecutors in similar future cases.

"The loss of my daughter will be a non-factor," she said.

Supporters of the bill rejected those concerns, noting that the 1973 abortion law is rarely used in domestic violence cases and that charges including assault, aggravated assault and attempted murder could still be sought.

More From WIBX 950