A 21-year-old woman in El Salvador who says she was raped and unwittingly gave birth to a stillborn son in a toilet has been cleared of murder during a retrial.

Evelyn Hernandez had always maintained she was innocent and did not know she was pregnant.

She was a teenager when she went to an outhouse in April 2016 to use the toilet after having stomach pains and her mother found her passed out.

A 32-week fetus was later found in the septic tank and Ms Hernandez was arrested – but both women said they did not know she had given birth.

Forensic experts were unable to determine whether the child died during birth or in the septic tank.

Ms Hernandez was previously convicted of intentionally inducing an abortion – which is illegal in the Central American country.

She had already served three years of a 30-year prison sentence which was overturned by the supreme court in February and a new trial was ordered.

Prosecutors argued during the retrial in Ciudad Delgado that Ms Hernandez had failed to protect her fetus and asked for a 40-year sentence.

But she was acquitted by a judge on Monday, with her lawyer Bertha Maria Deleon saying: He has said that there was no way to prove a crime and for that reason he absolved her.

We believe the judge has been very fair in his ruling, she added.

Thank God, justice was done, Ms Hernandez said afterwards. There are many women who are still locked up and I call for them to be freed soon too.

El Salvador, which has a population of just over six million, is a deeply religious country with 80% of the population identifying as Catholic or evangelical Christian.

Each year an estimated 25,000 women fall pregnant after being raped.

Those convicted of having abortions face prison sentences of between two to eight years.

Women who turn up at public hospitals following a miscarriage are sometimes accused of having killed the fetus and charged with aggravated homicide, which carries a sentence of 30 to 40 years.

Recent polls have shown support for more lenient abortion laws, though many in the country believe rape victims should be made to carry pregnancies to term.

President Nayib Bukele, who took office earlier this year, has pledged a softer approach to abortion and has said he favours legal terminations in cases where the life of the mother is at risk.

Erika Guevara-Rosas, Americas director at Amnesty International, said it was time El Salvador stopped criminalising women once and for all by immediately revoking the nation’s draconian anti-abortion laws.

This is a resounding victory for the rights of women in El Salvador. It reaffirms that no woman should be wrongly accused of homicide for the simple fact of suffering an obstetric emergency, she added.

(c) Sky News 2019: Evelyn Hernandez: Woman who gave birth to baby in toilet cleared of murder in El Salvador