The court ruled on Monday that there was not enough evidence to convict her. The prosecution, it said, had failed to prove that Ms. Hernández was in any condition to protect her baby.

In a statement, Morena Herrera, of the Citizen Group for the Decriminalization of Abortion, said that the acquittal was “a sign of hope for all women who remain in jail for crimes they did not commit for health problems that should never have been brought to court.”

“No woman should go through the ordeal that Evelyn did,” she added.

Women’s groups are likely to seize on the acquittal as they push to overturn other cases.

Advocates have identified 25 women who were sentenced to as much as 40 years for homicide or attempted homicide after suffering obstetric emergencies. As many as two dozen more were charged and jailed while they awaited trial before the charges were eventually dropped or they were acquitted.

Paula Avila Guillén, a lawyer and director of Latin American initiatives at the Women’s Equality Center in New York, who works closely with Salvadoran women’s groups, said the harsh anti-abortion law sets the homicide prosecutions in motion.

“The problem is that once the word abortion is out there, it completely stigmatizes the process,” Ms. Avila Guillén said. “There is no presumption of innocence against a woman once the word abortion is thrown out.”

In July, the Citizen Group, the Women’s Equality Center and two other human rights groups presented four cases, including Ms. Hernández’s, to the United Nations Working Group on Arbitrary Detention.