Some were already mothers, excited about having another baby. Others were upset or frightened to find themselves pregnant. All tested positive for drugs. And when these women lost their pregnancies, each ended up in jail.

More than 50 women have been prosecuted for child neglect or manslaughter in the United States since 1999 because they tested positive for drug use after a miscarriage or stillbirth, according to an investigation by The Marshall Project, The Frontier and AL.com that was co-edited and published in partnership with The Washington Post.

The medical community calls this legal approach harmful and counterproductive. But it’s a strategy many legal experts say is likely to become more common now that Roe v. Wade has been overturned, making it easier for states to pass laws that give fetuses and embryos the same rights as children or their mothers.

An analysis of court records and medical examiner data over the last 23 years found at least 20 felony cases in Alabama, 14 in South Carolina and 10 in Oklahoma, as well as nine in other states where prosecutors have embraced some form of “fetal personhood” in bringing criminal charges after miscarriage or stillbirth. Many of the prosecutions resulted in lengthy prison sentences and life-altering consequences for mostly poor women who were struggling with addiction.

In 20 additional cases, women in Alabama, Oklahoma and South Carolina were prosecuted after positive drug tests because their babies died shortly after birth.

Seven of the Oklahoma stillbirth and miscarriage cases were filed in the last two years. In many instances, the fetuses were not developed enough to be viable outside the womb. Sentences have ranged from probation to 20 years in prison. Women sent to prison after pregnancy loss are among the few Americans serving time for drug consumption; most laws criminalize drug possession and sales, not use.

Prosecutors who bring these cases say they see them as a deterrent, or a way to help women get drug treatment. “It stops the cycle, it stops them getting pregnant again and using drugs and trying to get around it,” said Brian Hermanson, district attorney for two small counties north of Oklahoma City.

But many medical experts say the causes of miscarriage and stillbirth are complex and often unclear, and there isn’t scientific proof that using methamphetamine or other drugs causes pregnancy loss. Healthy babies are delivered every day to people who used drugs while pregnant.

Read the full article about miscarriage or stillbirth resulting in incarceration by Cary Aspinwall, Brianna Bailey, and Amy Yurkanin at The Marshall Project.