MEXICO CITY (AP) — Mexico’s Supreme Court has decriminalized abortion nationwide two years after ruling that abortion was not a crime in one northern state.

That earlier ruling had set off a grinding process of decriminalizing abortion state by state.

Last week, the central state of Aguascalientes became the 12th state to decriminalize the procedure.

The sweeping decision comes amid a trend in Latin America loosening restrictions on abortion even as access has been limited in the United States.

Mexico City was the first Mexican jurisdiction to decriminalize abortion 15 years ago.