A 44-year-old mother of three was sentenced Monday to more than two years in an English prison for medically inducing an abortion about eight months into her pregnancy.

Justice Edward Pepperall in Stoke-on-Trent Crown Court said the “tragic” case required him to balance the woman’s reproductive rights with the rights of the fetus and said the sentence might deter others from exceeding the 24-week limit on abortions.

Pepperall said the mother could have avoided prison if she had pleaded guilty sooner and that he was sentencing her despite her “deep and genuine remorse” and the fact that her children, including one with special needs, would suffer without her.

“You are wracked by guilt and have suffered depression,” Pepperall said. “I also accept that you had a very deep emotional attachment to your unborn child and that you are plagued by nightmares and flashbacks to seeing your dead child’s face.”

The woman was 32 to 34 weeks along when she induced a miscarriage in May 2020 using medication intended for the first 10 weeks of pregnancy, the judge said.

The woman obtained the pills during the COVID-19 pandemic when the restrictions were loosened to allow abortion drugs to be delivered by mail. The woman lied when she told a pregnancy advisory service she was seven weeks pregnant and she continued to lie to others, including police, the judge said.

Evidence found the woman had conducted several internet searches for ending her pregnancy, including one that said, “I need to have an abortion but I’m past 24 weeks,” the judge wrote in his ruling.

“While the baby was not full term, she was approaching that stage of development,” prosecutor Robert Price said. “Multiple and prolonged internet searches showed a level of planning.”

Supporters of abortion rights criticized the sentence as unnecessarily harsh and called for an end to criminalizing abortion.

“This case is a damning indictment of abortion law in England,” said Mandu Reid, leader of the Women’s Equality Party. “Nothing about this conviction serves the public interest, or the interests of her and her children. It also reveals the indefensible, ugly truth about the criminalization of abortion. Opposition to abortion has never been about what’s best for children or women.”

Executives from professional organizations representing obstetricians, gynecologists and midwives had urged the judge in writing not to imprison the woman.

Pepperall said they shouldn’t have sent the letter, saying it was as inappropriate as abortion opponents lobbying the court.

A spokesperson for Prime Minister Rishi Sunak said criminalizing abortion was proper in the right circumstances.

“Our laws as they stand balance a woman’s right to access safe and legal abortions with the rights of an unborn child,” spokesperson Max Blain said. “I’m not aware of any plans to address that approach.”

The woman was sentenced to 28 months in prison, but Pepperall said she’d serve up to half that term in custody.

Pepperall said he arrived at the sentence by consulting the 2012 case of a mother originally sentenced to eight years in prison for using medication to terminate her pregnancy a week before she was due to give birth. The Court of Appeal later reduced her prison term to 3½ years.