Evelyn Beatriz Hernandez, who says she is a rape victim and had no idea she was pregnant, had already served 33 months of her 30-year sentence when the Supreme Court overturned the ruling against her in February and ordered a new trial, with a new judge.
It is the first retrial of an abortion case in a country that aggressively pursues legal cases against women who have experienced miscarriages and obstetric emergencies, accusing them of murder.
“I want justice to be done,” Ms Hernandez said as she entered the courthouse.
“I know everything is going to be OK. My faith lies with God and my lawyers.” Ms Hernandez, 21, said she hoped for “good things, unlike what happened before, and I am innocent”.
Women’s rights advocates hope the new government of president Nayib Bukele, who took office in June, will soften the country’s stance on women’s reproductive rights, starting with an acquittal for Hernandez.
Dozens of women have been jailed in El Salvador with similar convictions.
“What Evelyn is living is the nightmare of many women in El Salvador,” said her lawyer Elizabeth Deras.
Ms Hernandez has said she recalls making her way to an outhouse in a poor, rural community in April 2016 with strong abdominal pains.
She squatted to defecate, she says, and the baby must have slid to the bottom of the septic tank.
Evelyn’s mother says she found her daughter passed out next to the makeshift toilet and hailed a pick-up truck to transport her to a hospital 30 minutes away. The fetus was 32 weeks old – nearly full term.
Forensic examiners were not able to determine whether the death occurred in the womb or in the faeces. The cause of death remains unclear.
Both women insist they did not know there was a baby in the septic tank.
“I truly did not know I was pregnant,” Ms Hernandez said. “If I had known, I would have awaited it with pride and with joy.”
Prosecutors do not believe them, though the Supreme Court accepted defence lawyers’ argument that no proof had been presented that Ms Hernandez caused the baby’s death.
The trial of Ms Hernandez was due to begin today in what looks to be the first test for women’s reproductive rights under Mr Bukele, who is young and has expressed disdain for all forms of discrimination.