New York’s abortion law was updated and strengthened Tuesday night when Gov. Andrew Cuomo signed the Reproductive Health Act into law that had just passed the Senate and Assembly.

The bill was first introduced in the Democratic-run Assembly in 2006 but had not been taken up by the Senate until the Democrats wrested control from Republicans this year.

The law for the first time allows abortions after the 24-week mark to protect the mother’s health or in cases where the fetus won’t survive.

Previously, abortions after that point were permitted only to preserve a mother’s life.

The legislation also removes abortion from the criminal code and clarifies that a range of medical professionals, not just licensed physicians, can perform the procedure.

Advocates had said New York’s law would protect abortion rights in the event that a conservative US Supreme Court overturns the 1973 Roe vs. Wade decision that legalized abortion.