The mother of the man who fathered former Republican vice presidential candidate Sarah Palin's grandson is set to serve out most of her three-year drug sentence under home confinement.

Sherry Johnston was released from Alaska's only women's prison on Monday and is wearing an ankle-monitoring device at her home, attorney Rex Butler said Thursday.

Johnston, 43, was sentenced last month on her guilty plea in August to one count of possession with intent to deliver the painkiller OxyContin. Five other felony counts were dropped.

Johnston is the mother of Levi Johnston. He and 18-year-old Bristol Palin — the eldest daughter of the 2008 Republican vice presidential candidate — were engaged but called off the wedding after their son, Tripp, was born late last year.

Butler said Sherry Johnston's health problems and her nonviolent offense were factors in the decision by the state Department of Corrections to allow her home confinement in Wasilla, about 40 miles north of Anchorage.

Corrections department spokesman Richard Schmitz did not immediately return a call to The Associated Press seeking comment.

Butler said Johnston suffers from serious medical problems, scurvy and chronic pain from nerve damage stemming from pelvic surgery. The pain requires Johnston to wear implanted medication pumps, he said.

Johnston will be closely monitored, according to Butler. She must stay near her landline phone and will be subject to unannounced visits from members of a state corrections team who will test her for alcohol and drugs not prescribed to her.

She will be allowed to leave her home only four hours a week to run errands, Butler said.

"She's on a very tight time frame," he said.

Sarah Palin was campaigning for the vice presidency when the case against Johnston began in September 2008 after investigators intercepted a package containing 179 OxyContin pills. The suspects who were arrested agreed to become informants.

Authorities 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 2008 was videotaped by police, authorities said. Johnston was arrested last December.

Sarah Palin announced on Sept. 1, 2008, the first day of the Republican National Convention, 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. Levi Johnston attended the convention in Minnesota where he watched as Sarah Palin accepted the vice presidential nomination.

Levi Johnston and Bristol Palin's baby was born in late December, a short time after Sherry Johnston's arrest.

Palin resigned as Alaska governor in July.