A Nebraska woman who acquired abortion pills that her teenage daughter used to end her pregnancy last year was sentenced on Friday to two years in prison.

The woman, Jessica Burgess, 42, was charged after the police found her private Facebook messages, which revealed plans she had with her daughter to end the pregnancy and “burn the evidence.”

Prosecutors said that Ms. Burgess ordered the pills online and gave them to her daughter, Celeste Burgess, in April 2022, when her daughter was 17 and in the third trimester of her pregnancy. The Burgesses later buried the fetal remains, the authorities said.

Ms. Burgess pleaded guilty in July to violating Nebraska’s abortion law, furnishing false information to a law enforcement officer and removing or concealing human skeletal remains. Celeste Burgess was sentenced in July to 90 days in jail and two years of probation after she pleaded guilty in May to removing or concealing human skeletal remains.

Jessica Burgess, who faced up to five years in prison, was sentenced to two years, with her terms for false reporting and removal of skeletal remains running concurrently.

Brad Ewalt, a lawyer for Ms. Burgess, asked Judge Mark A. Johnson of Madison County District Court on Friday to sentence his client to probation. The judge denied the request, saying that Ms. Burgess had treated the fetal remains “like yesterday’s trash,” The Norfolk Daily News reported.

Celeste Burgess, who was released from jail on Sept. 11, sat near the back of the courtroom on Friday and wiped tears from her face when her mother was sentenced, The Daily News reported.

Mr. Ewalt and the Madison County prosecutor who tried the case did not immediately respond to requests for comment on Friday.

A police investigation into the Burgesses began before the Supreme Court overturned Roe v. Wade in June 2022. The case has fueled fears that people who end their pregnancies in the post-Roe era, and those who help them, could be prosecuted for having abortions and that their private communications could be used as evidence against them.

The investigation began in late April 2022, when the police in Norfolk, Neb., began looking into whether a 17-year-old girl had given birth prematurely to a stillborn baby, and whether the girl and her mother had buried it, according to court documents.

At the time, abortion was banned in Nebraska after 20 weeks from conception. This May, Gov. Jim Pillen, a Republican, signed a 12-week ban into law.

The Burgesses were initially charged with concealing a stillbirth. But according to court documents, a detective later asked Celeste Burgess for the exact date her pregnancy ended. When she said she needed to check her Facebook messages to remember, the detective obtained a warrant for messages she had exchanged with her mother.

Meta, the parent company of Facebook, complied with the warrant. The detective found evidence of a medically induced abortion, according to court documents, allowing the authorities to file additional charges.