Dafne McPherson was accused of murdering her newborn and found guilty in July 2016, but an appeals court says evidence was flimsy.
The case highlights the criminalisation of women who suffer miscarriages in parts of Mexico with intensely conservative and Catholic cultures.
“I’m very happy. I’m going to be able to see my baby,” she said, referring to her daughter Lía, who she had not seen for three years.
But she had bitter words for the prosecutors. “They didn’t investigate –they didn’t do a thing … That’s why there are people inside who shouldn’t be in prison.”