MEXICO CITY — Marking a new victory for women’s rights in Latin America, Evelyn Hernández, who was convicted three years ago of aggravated murder after delivering a stillborn in El Salvador, was acquitted in a retrial on Monday.

She has become the latest standard-bearer for the dozens of women accused of homicide after having miscarriages in the deeply conservative and machista Central American nation where abortion is banned in all cases, including when the woman's life is in danger.

Her defense attorneys said that prosecutors ignored scientific evidence during the first trial. For the retrial, they centered their strategy on the presence of meconium in the baby’s lungs as evidence that it died of asphyxiation.

The final hearing of the retrial began on Thursday but the verdict, expected to be delivered that day, was postponed twice. This time around, the prosecution had asked for a harsher sentence: 40 years, a decade longer than the original sentence.

Hernández’s acquittal comes at the heels of the Supreme Court’s decision to commute the 30-year sentences of three women jailed for abortion convictions. Still, legal reform is unlikely to pass the right-wing-majority legislature in the foreseeable future. El Salvador has bucked the regional trend toward liberalization of abortion laws, even as reports of sexual violence have increased in recent years.

“We celebrate today, but we keep fighting tomorrow," Paula Ávila-Guillén, director of Latin America Initiatives at the Women’s Equality Center, told BuzzFeed News in a phone call after the verdict was announced.

Raped by a member of a local gang while she was still a teenager, Hernández became pregnant but said she didn’t become aware of it until 32 weeks later, when she delivered a baby in a latrine in her home in rural El Salvador. Bleeding profusely, Hernández passed out. She woke up in the emergency room, where she was detained by police.

Hernández served 33 months in jail before her sentence was annulled in February following an appeal from her lawyers. Prosecutors called for a retrial, underscoring the aggressive persecution of women suspected of inducing abortions.

Now 21, Hernández has begun rebuilding her life, going back to school and getting a part-time job. But the threat of a return to prison loomed over her during the last six months. During that time, a collective of 17 women who were imprisoned for similar charges and since released advocated for Hernández’s freedom.

“We will not stop until all of them are free, because none of them deserve to be in prison,” Teodora Vásquez, a member of the collective, told BuzzFeed News.

El Salvador's recently inaugurated president, Nayib Bukele, who has publicly opposed punishing low-income women who have had obstetric emergencies, has not commented publicly on Hernández’s retrial, which has captured the country’s attention. Instead, he celebrated the birth of his first daughter on Thursday, updating his Twitter bio to “Father of Layla.”

Hernández’s case was the first of its kind tried under Bukele. About 147 women were sentenced to prison for abortion or homicide between 2000 and 2014, according to the El Salvador–based Citizens' Group for the Decriminalization of Abortion. At least 16 women remain incarcerated for pregnancy-related complications; some are serving 30-year sentences, and two others are in the middle of legal proceedings.

Johnny Wright Sol, a former lawmaker who introduced a petition in 2017 to legalize abortion in cases where the woman’s life is in danger or when a minor has been raped, applauded the verdict but said that there is still work to be done.

“The next step is to sit down and have a long conversation about what happened,” said Wright Sol. “This is not a moment to let up on the pressure.”