The prosecution of Purvi Patel began in sorrow and ended in more sadness this week. Patel, a 33-year-old woman who lives in Indiana, was accused of feticide — specifically, illegally inducing her own abortion — and accused of having a baby whom she allowed to die. The facts supporting each count are murky, but a jury convicted Patel in February, and on Monday she was sentenced to 20 years in prison.

It’s tempting to simply look away from Patel’s case on the grounds that it is an outlier, however tragic. But it demonstrates how unsparing the criminal-justice system can be to women whose pregnancies end in (or otherwise involve) suspicious circumstances. If one lesson of the case is about the legal risk of inducing your own late-term abortion, another is about the peril of trying to get medical help when you are bleeding and in pain.

Last July, Patel went to an emergency room in South Bend, Ind., where she told the doctors she had a miscarriage. Asked what she had done with the fetal remains, she said the baby was stillborn and, not knowing what else to do, she put the body in a bag and left it in a Dumpster. The police were able to recover the body. Later, they also found text messages in which Patel told a friend about ordering pills to induce an abortion from a pharmacy in Hong Kong and about taking the medication. Three days later, she texted the same friend, “Just lost the baby.”

Patel was charged with felony child neglect and feticide, based on the supposed self-abortion. Asked by Slate’s Leon Neyfakh about the apparent contradiction between the charges, the St. Joseph County prosecutor, Ken Cotter, said that a person can be guilty of feticide under Indiana law for deliberately trying to end a pregnancy, even if the fetus survives. As Neyfakh points out, the Indiana feticide statute exempts legal abortions — but while the pills Patel took are available in the United States with a prescription, it’s against the law to order them online, as she apparently did. And so she was prosecuted for taking the medication as well as for letting her baby die after the self-abortion failed.