A Salvadoran court has released Maria Teresa Rivera, a woman jailed for having a miscarriage. The decision to release Rivera, who was jailed in 2012, is a symbol of hope to the many women incarcerated on wrongful abortion charges in the Central American nation.

Rivera, 33, was arrested in a hospital after her mother-in-law found her in her bathroom almost unconscious and bleeding heavily. Staff at the hospital reported her to the police and accused her of having an abortion, despite her claim that she didn’t even know she was pregnant.

After an eight-month trial, Rivera was convicted of aggravated homicide and sentenced to 40 years in prison – the longest sentence that had ever been imposed on a woman in El Salvador for an abortion crime.

“The judge didn’t believe me when I told him that I didn’t even know I was pregnant at the time and that I’d started bleeding at home and had a miscarriage,” Rivera told Al Jazeera in an interview in 2014.

“I’ll never understand why he was so harsh. I thought about my young son who’ll be nearly 50 by the time I’m released. … My son won’t know me when I leave jail.”

Since her imprisonment, Rivera had received support from human rights groups, including a Salvadoran feminist organization called the Agrupación Ciudadana por la Depenalization del Aborto (Civic Group for the Depenalization of Abortion). Those efforts concluded in Rivera’s special session trial, which began May 11, to revisit her 2012 conviction and sentence.

She was released Friday after a judge ruled that there was not enough evidence to prove that Rivera had done anything intentional to cause the death of the fetus.

According to Morena Herrera, the president of Agrupación, there are still about 25 women wrongfully imprisoned in El Salvador for abortion-related crimes.

“Most of the imprisoned women experienced judicial errors similar to those that occurred in Maria’s Teresa trial,” she said in an interview with Rewire.

In 2014, a coalition of NGOs led by Agrupación Ciudadana and the Center for Reproductive Rights (CRR) launched the Las17 online campaign calling for the release of Rivera and 16 other Salvadoran women, all of whom were charged with abortion and homicide after suffering pregnancy-related complications. After the release of Rivera and two others within the past several months, the CRR reports, the remaining 14 are still behind bars.

Nonetheless, the release of any wrongfully imprisoned woman is a victory for the human rights movement in El Salvador.

“The release of María Teresa is yet another step towards justice in a country where women are treated as mere second class citizens,” said Erika Guevara-Rosas, Americas director at Amnesty International, in a statement. “She should have never been forced to spend one second behind bars. Her release must be a catalyst for change in El Salvador, where dozens of women are put in prison because of an utterly ridiculous anti-abortion law which does nothing but put the lives of thousands of women and girls in danger.”

El Salvador has some of the most stringent abortion laws in the world today, but this wasn’t always the case. For years, abortion was legal in the case of rape if the pregnancy threatened the mother’s life and other circumstances.

But in 1998, an amendment to the Penal Code criminalized abortion in all circumstances, even when it is necessary to save a woman’s life. The amendment has led to a series of wrongful convictions and a targeting of women (especially those of low income) who are not given fair opportunities to defend their cases.

Abortion is a punishable crime in several countries around the world, but only four in Latin America – El Salvador, Chile, Nicaragua and the Dominican Republic – ban the procedure entirely.