A Salvadoran woman imprisoned for attempted abortion charges was acquitted after almost 20 months She said she was abused by her stepfather and didn't know she was pregnant.

LONDON -- A Salvadoran woman who spent almost 20 months in prison was acquitted of attempted homicide after being accused of attempting to terminate her pregnancy.

Imelda Cortez, 20, was facing up to 20 years in prison over charges that she attempted to induce an abortion and harm her baby, who survived. She said she was sexually abused by her stepfather for six years.

"I’m so happy with the outcome of the hearing today. We’re ready and waiting for her with open arms," Cortez’s grandmother, Julia, said in a statement to ABC News.

El Salvador is considered to have one of the most extreme anti-abortion laws in the world, where abortions are illegal under any circumstances, according to the UN. The country is also known for regularly prosecuting and incarcerating women suspected of having had abortions, according to Foreign Policy.

Earlier this year, a proposal to allow women to have abortions if they were victims of rape as minors or were facing life or health risks during their pregnancies was rejected in the country’s legislative house.

"We know women like Imelda are still bound and jailed by these heinous laws," Paula Avila Guillen, the director of Latin America initiatives at the Women’s Equality Center, told ABC News in a statement after Cortez's release on Monday. "Imelda’s case exemplifies the terror that extreme abortion bans exert on poor, vulnerable women and girls."

A total of 6,108 cases of sexual violence against women were reported in El Salvador in 2017, according to UN Women. Between January and June of this year, National Police responded to 11 cases of sexual aggression daily.

“The acquittal of Imelda Cortez is a good sign in the right direction,” Lara Blanco, regional deputy director for Latin America and the Caribbean for UN Women, told ABC News. “But we cannot be satisfied with the pace of change if we consider the high price that the accumulation of violence and unfair legal frameworks have on the lives of women.

“The current signs are not promising that a legal reform is coming anytime soon,” Blanco said.

Cortez was arrested in April 2017 after suffering an obstetric emergency and delivering her baby. She said she did not know she was pregnant.

"This was a miscarriage of justice from the very beginning," Ana Martinez, Cortez’s lawyer, told ABC News in a statement. "This vulnerable young woman survived sexual violence only to be pursued for a crime she did not commit."

"Imelda goes home to her family today and will finally be able to meet her daughter and attempt to rebuild her life. We wish the same — and soon — for the women still jailed for obstetric emergencies," Martinez said. "The women of El Salvador deserve better."