More than 9,000 women in the impoverished southern state undergo clandestine abortions every year.

The southern Mexican state of Oaxaca has decriminalised abortion, making it the second jurisdiction in the country to allow terminations for women who are up to 12 weeks pregnant.

The state legislature passed the bill with 24 votes in favour and 10 against on Wednesday.

Campaigners on both sides of the debate took to the streets outside the congressional building during the contentious vote.

Some wore green scarves to show their support for legal abortion and carried banners that read: “the debate is not abortion or no abortion, but a legal or clandestine one”.

Counter-protesters demanded legislators “defend life, God and the commandments”.

Fundar Mexico, a rights group, hailed the move as a “historic day for the women of Oaxaca”.

According to government figures, thousands of clandestine abortions occur every year in Oaxaca, one of Mexico‘s poorest states. It is the third cause of death among women in the region

“In Oaxaca a year more than 9,000 women undergo an abortion and according to the latest data, 17 percent are indigenous women under 20,” Natalia Torres, legal representative of the women’s group March 8, told Al Jazeera on Wednesday.

About 20 women have been imprisoned in Oaxaca for illegal abortions since 2016, according to the newspaper El Pais.

Anti-abortion rights demonstrators hold a protest outside the local congress in Oaxaca as legislators voted legislation that would decriminalise abortion [Jorge Luis Plata/Reuters]

The legalisation of abortion in Oaxaca came days after President Andres Manuel Lopez Obrador sent a bill to the country’s parliament that proposed amnesties for some offences, including abortion.

Mexico City is the only other region that allows legal abortions. The other 31 Mexican states only permit abortions in cases of rape.

Hoy Oaxaca le dijo sí al aborto legal convirtiéndose en la segunda entidad de México en despenalizar la interrupción del embarazo después de Ciudad de México. Muchas celebran con #AbortoLegalOaxaca. pic.twitter.com/qOSDbxEKHk — AJ+Español (@ajplusespanol) September 25, 2019

Translation: Today Oaxaca said yes to legal abortion, becoming the second jurisdiction in Mexico to decriminalize the termination of pregnancy after Mexico City.