MEXICO CITY- The Mexican state of Oaxaca on Wednesday approved a bill to legalize abortion, making it only the second region of the predominantly Roman Catholic country after Mexico City to permit the procedure.

Amid raucous shouts of protest from opponents, the local Congress voted by 24 lawmakers in favor to 10 against to allow abortions during the first 12 weeks of pregnancy in Oaxaca, a southern state that has long been among Mexico’s poorest.

The state Congress is dominated by the leftist National Regeneration Movement of President Andres Manuel Lopez Obrador, who has avoided taking a clear stand on abortion.

Approval of the measure came just a few days after Lopez Obrador sent a bill to the federal Congress that would grant an amnesty to women serving jail terms for abortion.

Outside of the Mexican capital, which legalized abortion in 2007, the procedure has been illegal in all states until now except under certain circumstances, such as rape.