By Tracy Wilkinson and Cecilia Sanchez

Reporting from Mexico City — Advocates say the women, who insist they suffered miscarriages, got caught up in Mexico’s cultural wars over abortion.

The seven women were accused of killing their newborn babies and handed long prison sentences. They insisted they had suffered miscarriages and should not be punished; one claimed she wasn’t even sure she was pregnant.

The women have finally been freed, after years in jail and only after their cause was taken up by human rights organizations here and abroad and by a handful of determined legislators.

However the pregnancies ended, the cases highlighted the poor quality of reproductive healthcare and education in parts of Mexico, and the stigma still attached to unwanted pregnancies.

The seven on Tuesday evening stepped from prison in the colonial city of Guanajuato, 220 miles northwest of Mexico City, raising their arms in joy and shouting, “We are free!” Relatives and supporters greeted them.

“I just want to move on, study and help other women,” one of the women, Yolanda Martinez, told reporters Wednesday morning.

Free, but not exonerated. The women were released only after the state legislature reduced the penalty for the crime most were convicted of: infanticide.

Advocates for the women say they got caught up in Mexico’s cultural wars over abortion. Abortion was legalized in Mexico City in 2007, but not in the rest of the country. In numerous states, Guanajuato included, there has been a backlash as local authorities seek to restrict even further the ability of women to terminate their pregnancies.

Veronica Cruz, director of Las Libres social-welfare center in Guanajuato that supported the women, said she believed authorities wanted to prosecute the women for having induced abortions. But abortion only carries a sentence of six months to three years in jail. By charging them with killing a full-term born infant, authorities could send the women to prison for up to 29 years and send a chilling message.

“In reality, they just wanted to further criminalize abortion,” Cruz said in a telephone interview from Guanajuato.

Martinez had served six years and eight months of a 25-year sentence. An additional 160 women are behind bars in Guanajuato for having had abortions or self-induced miscarriages, Cruz said.

Guanajuato Gov. Juan Manuel Oliva had said abortion was not the issue, noting the women were imprisoned for killing their babies, not for having had abortions. But, as pressure mounted, he agreed to review the cases and eventually proposed that the penalties be reduced.

Two of the seven women released from jail had said they were impregnated in rapes. Another of the freed women, Ana Rosa Padron, said she was happy to be pregnant and looking forward to the birth of her second child. After feeling terrible pain in her belly, she passed out and awoke to find she had miscarried, she said. But state investigators accused her of giving birth and then smothering the baby by clamping her hand over its mouth and nose. She began serving a 29-year sentence two years ago.

Marianne Mollmann, advocacy director for women’s rights at the New York-based Human Rights Watch, began investigating the Guanajuato cases a year ago. She said that while it is impossible to know exactly what happened to end the pregnancies, it was clear that authorities were determined to prosecute the women “without compassion or concern for the context.”

“It was strange to me that [prosecutors] were so viciously targeting women who are not given the basic tools to make responsible decisions about their reproductive lives,” Mollmann said in a telephone interview from New York.

State investigators declined to comment Wednesday. They previously have defended their handling of the cases and insisted the women were guilty.