MONTERREY, Mexico - When a nurse arrived at Martha Mendez's bedside in a Mexican hospital carrying a fetus and told the teenager to ask it for forgiveness, Mendez resigned herself to the prison sentence she assumed would inevitably follow.
It was March 2015, and hours earlier Mendez had arrived at the public hospital in the southern state of Veracruz suffering from pain and stomach cramps.
She said she was unaware she was pregnant and that the medication she'd been prescribed months earlier, after being misdiagnosed with gastritis, could harm her pregnancy.
After she suffered a miscarriage in the hospital, first the medical staff and then local prosecutors accused her of committing the crime of inducing her own abortion - sparking a legal battle that went all the way to the Supreme Court.
While Mexico's highest court declined to rule on Mendez's situation and her case was eventually shelved, she watched in shock on Tuesday as the body declared that abortion was not a crime.
"I felt overjoyed," she told Reuters by telephone. "It was part of feeling free after everything I went through."
According to the Mexican reproductive rights group GIRE, 172 people in Mexico were imprisoned for the crime of an illegal abortion from January 2010 to January 2020.
Over 3,500 more - including Mendez - were accused of the crime, according to GIRE's data, which was obtained through freedom of information requests and was shared exclusively with Reuters ahead of its publication.
All but four Mexican states - Oaxaca, Veracruz, Hidalgo and Mexico City - prohibit abortion under most circumstances, although it is legal in all states in cases of rape.
Veracruz legalized abortion earlier this year; it was restricted when Mendez was accused of the crime.
While Tuesday's unanimous Supreme Court ruling did not overturn those bans, it set a binding precedent that judges cannot sentence people to jail for either having, or assisting in, illegal abortions.
Advocates say eliminating the threat of prison time for those seeking an abortion is the most significant part of the ruling.
"Now all women know that if they decide to have an abortion they won't be criminalised, they won't be persecuted," said Veronica Cruz, co-founder of the Guanajuato-based advocacy group Las Libres.
No more jail
Reuters could not determine exactly how many people in Mexico are currently jailed for illegal abortions. It was not immediately possible to contact any.
Supreme Court President Arturo Zaldivar said in a news conference on Wednesday he did not know the number of those imprisoned, but that the criminalisation of abortion has primarily affected poorer women.
"Rich girls have always had abortions and never gone to prison," he said.
The government does not publish data about how many people have been jailed for having or assisting in illegal abortions, although publicly available crime figures show it has opened 432 investigations nationwide so far this year.
For years, reproductive rights advocates in Mexico have sought to track such cases and provide legal support to the accused, some of whom - like Mendez - say they were criminalized after miscarriages.
Tuesday's ruling marked a striking contrast with new abortion restrictions in Texas, just across the border.
"In the same week, we have these regressive changes in Texas, and this advance in Mexico," said Isabel Fulda, deputy director of GIRE.
Protection for activists
The Mexican court decision came in response to a legal challenge to a 2017 law in the northern border state of Coahuila, which set a maximum prison sentence of three years for either having, or assisting with, an illegal abortion.
The ruling immediately invalidated the Coahuila law, and paved a path for advocates to challenge abortion restrictions nationwide.
The ruling also offers increased security to members of the dozens of feminist collectives that for years have helped women induce abortions, using widely available medications such as misoprostol.
Cruz's group, Las Libres, was among the first in Mexico to begin offering this so-called "accompaniment" to women, offering them both emotional support and practical information based on World Health Organisation's recommendations.
Since the early 2000s, Las Libres has helped thousands of women access a self-induced abortion, Cruz says.
Among those who have since joined this effort is Mendez, who now lives in Guanajuato with her first child, a 9-month-old son, and helps women through the process of taking the pills at home.
"Now I feel like it's safer for me to help other women," she said.