A Montgomery County woman whose conviction in another young woman’s overdose death was overturned earlier this year has pleaded guilty to lesser charges in the case.

Before her original conviction was thrown out, Emma Semler, 26, had been sentenced to 21 years in prison for distributing heroin resulting in death. In the new plea agreement, she acknowledges that her purchase of heroin — which she used with Jenny Werstler, 20 — caused Werstler’s death in 2014.

But under the new agreement, Semler pleaded guilty Monday only to distributing heroin (and distributing the drug near a playground). As part of the agreement, federal prosecutors said they would recommend a sentence of seven to 10 years in federal prison.

But Judge Gene E.K. Pratter, who presided over Semler’s original case, said it was unlikely she would deliver the new sentence as recommended. “I do not have to do what these lawyers are asking me to do,” she said in court Monday. “I cannot tell you there is a good chance I’ll accept this sentence. I find it the hardest to choke down that’s ever been presented to me.”

» READ MORE: After overdose death, two families are left picking up the pieces.

Pratter accepted Semler’s guilty plea. But if she does not accept the parties’ recommended sentence, the plea agreement allows Semler to withdraw her guilty plea, and the case could continue to a second trial.

Acting U.S. Attorney Jennifer Arbittier Williams said in a statement Tuesday that Semler is “[culpable] for the federal crime she committed when she left Jennifer Werstler to die. … Now she has admitted her guilt before a federal judge, for which she will once again be sentenced and face the consequences of her actions.”

Semler’s lawyer, Mark Cedrone, declined to comment, as did members of the Semler and Werstler families.

Semler, of Collegeville, was first convicted in 2019 in the death of Werstler, whom she had met in an addiction treatment program when the two were teenagers. On the night of Werstler’s 20th birthday in 2014, the two injected heroin together in the bathroom of a West Philadelphia Kentucky Fried Chicken. Werstler fatally overdosed; Semler and her younger sister, 17, fled the bathroom without alerting anyone.

Prosecutors had argued that Semler, who purchased the drugs, was responsible for Werstler’s death. She was convicted and sentenced to 21 years in prison in 2019 — the mandatory minimum for distributing heroin resulting in death, plus one year.

Laws on drug-induced homicide have become a favorite tool for local prosecutors around the country amid a skyrocketing overdose crisis. Advocates for people in addiction rallied around Semler’s case, arguing that such laws often target people in addiction who used drugs with friends, instead of high-level drug traffickers, and discourage people from calling an ambulance for overdose victims.

In June, a U.S. Appeals Court agreed in part, saying that the federal statute doesn’t apply to cases where the victim and the accused acquired and used small amounts of drugs together.

Applying the law otherwise “diverts punishment from traffickers to addicts, who contribute to the drug trade only as end users and who already suffer disproportionately from its dangerous effects,” said Circuit Judge Jane Richards Roth, writing for the majority in the case.

The appeals court vacated Semler’s conviction and ordered a new trial. But Roth and the court’s majority left open the possibility that Semler could still be convicted under the new standard it set for her case.

At her first sentencing in 2019, Semler said she had “extreme remorse” for Werstler’s death, and in the years since had entered recovery, got a job at an addiction treatment clinic, and sponsored others in recovery. Pratter countered that she had not apologized directly to Werstler’s family and told her to do so.

The judge echoed that sentiment in Monday’s hearing, pressing Semler on whether she remembered the moment of Werstler’s death. “Do you remember her dying? Leaving her on the floor of the bathroom?”

“I remember we were really high. I remember her going in and out,” Semler said. “I remember leaving the bathroom.” But, she said, she didn’t realize Werstler was near death.

Pratter didn’t hold back on her distaste for the plea agreement, repeatedly telling Semler it was unlikely she would accept the lighter sentence.

In court, while Werstler’s mother wiped away tears, federal prosecutor Everett Wetherill told Pratter that he was trying to provide “a sense of justice” to the Werstlers and added that they had been part of the negotiations around the plea agreement.

“I can see how they feel right now,” Pratter countered.

Cedrone told Pratter he understood the agreement could “seem like a tough pill to swallow. But the parties believe it to be very fair. The lawyers who have negotiated this believe this to be a fair representation of litigation risk” — the possibility of the case going to trial.

“Miss Semler would like to get on with her life, and not risk going to jail for 21 years,” he said.