Evelyn Hernandez, who was sentenced to 30 years in prison for a suspected abortion, leaves after being absolved at a hearing in Ciudad Delgado. Picture: Reuters/Jose Cabezas

Ciudad Delgado, El Salvador - A Salvadoran court absolved a woman previously convicted of aggravated homicide after she gave birth to a stillborn child, the woman's lawyer Bertha DeLeon said on Monday, in a closely watched retrial that overturns a 30-year prison sentence.

Defendant Evelyn Hernandez, 21, has already served three years of the sentence handed down after prosecutors said she had induced an abortion.

The case had attracted international attention.

"Thank God, justice was done," Hernandez, in tears, told a cheering crowd outside the court building.

Any intentional termination of a pregnancy in El Salvador can be prosecuted as a crime, including stillbirths due to home delivery or abortions induced because of medical emergencies, with some women receiving up to 40 years in prison.

"We believe the judge was very just in the ruling. The judge said there was no way to prove a crime was committed and that is why (Hernandez) was acquitted," said DeLeon.

Some 147 Salvadoran women were sentenced to up to 40 years in prison in such cases between 2000 and 2014, according to the Citizen Group for the Decriminalization of Abortion, a local rights group.

"There are many women who are still locked up and I call for them to be freed soon, too," said Hernandez.

In February, the Supreme Court ordered Hernandez released and retried, saying that the original judge's decision was based on prejudice and insufficient evidence.

Reuters