Evelyn Hernandez was convicted of murder but said her son was stillborn. PHOTO/AFP
A court in El Salvador has freed a woman who was sentenced to 30 years in prison after she gave birth to a stillborn baby in a toilet.
Evelyn Beatríz Hernández Cruz, 20, had served nearly three years of her sentence for aggravated homicide.
Following an appeal, a court-ordered she be re-tried, but she will be able to live at home during the process.
She and her lawyers have always maintained she was unaware she was pregnant and no crime had occurred.
But prosecutors said she was guilty of murder because she had had not sought out antenatal care.
Activists greeted her at the jail gates, chanting "Evelyn, you are not alone".
The Central American country bans abortion in all circumstances, and dozens of women have been imprisoned for the deaths of their fetuses in cases where they said they had suffered miscarriages or stillbirths.
In April 2016, Ms. Hernández gave birth in the latrine of her home in a small rural community. She lost consciousness after losing large amounts of blood.
Her mother told the BBC that police arrived at a hospital after the pair went there for emergency care.
Ms. Hernández said she did not know whether her baby had been born alive or dead and that she would have gone to see a doctor if she had known she was pregnant.
During her original trial, she said she had been repeatedly raped. Her lawyers said she was too frightened to report the rapes, and some reports said the man who raped her was a gang member.
Medical experts could not determine whether the fetus had died in her womb or just after being born.