Sherry Johnston pleaded guilty Wednesday to one count of possession with intent to deliver the painkiller OxyContin. Five other felony counts were dropped.
"That's pretty," Johnston said as a state trooper's pink handcuffs were placed around her wrists.
She hugged her lawyer, Rex Butler, before being escorted out of the courtroom and taken to a correctional facility where she'll be held until her Nov. 20 sentencing.
Although Johnston could receive 20 years in prison, her attorney and prosecutors agreed to a five-year sentence, with two years suspended, Butler said, considering the small quantities of drugs involved. The judge has the sentencing recommendation under review.
Johnston, 42, is the mother of 19-year-old Levi Johnston. He and 18-year-old Bristol Palin were engaged but called the wedding off after their son, Tripp, was born in December.
Levi Johnston didn't attend his mother's hearing but his younger sister, Mercede, did.
Sherry Johnston has two pain pumps implanted in her body to deliver medication because she suffers a rare condition involving scurvy and chronic pelvic pain from prior medical surgeries, Butler said. She was receiving professional pain relief treatment but the problems arose when her insurer refused to pay for the medication, Butler said.
"People want to think she was just a drug addict," he said. "She made a poor judgment choice. But what do you do?"
Assistant District Attorney Richard K. Allen said prosecutors considered Johnston's criminal-free background as well as her physical problems in agreeing to the mitigated sentence.
"Rehabilitation would be the goal," he said.
The case against Johnston began last September when investigators intercepted a package containing 179 OxyContin pills. The suspects who were arrested agreed to become informants.
Police said Johnston set up a meeting with one of the informants, who bought 10 pills of 80-milligram OxyContin using $800 provided by investigators. A second purchase was made the following day, and a third purchase in November was videotaped by police, authorities said.
Johnston was arrested in mid-December and charged with six felony drug counts. Levi Johnston and Bristol Palin's baby was born a short time later.
Sarah Palin announced on the first day of the Republican National Convention on Sept. 1, 2008, that her unwed daughter was pregnant. The McCain-Palin campaign issued a statement saying Bristol Palin "and the young man" would get married.
Sherry Johnston eventually disclosed that her son was the father. The following week, Levi Johnson attended the convention in St. Paul, Minn., when Sarah Palin accepted the vice presidential nomination.
Palin resigned as Alaska governor last month.