[Read more about how Jayme’s disappearance shook her hometown.]

She managed to escape 88 days later, on Jan. 10, and sought help from a passer-by, who took her to a nearby house and got word to the authorities. Within hours, sheriff’s deputies had arrested Mr. Patterson. He was charged with two counts of first-degree intentional homicide, one of kidnapping and one of armed burglary, and was ordered held on $5 million bail.

Mr. Patterson pleaded guilty on Wednesday to the two homicide counts and kidnapping; the burglary charge was dropped. Mr. Jones said Mr. Patterson rejected the other options his lawyers offered him, including trying to persuade the court to set aside his confession, The A.P. said.

Jayme’s disappearance and the killing of her parents baffled the authorities for months. The case attracted national media attention, as scores of detectives fanned out across Wisconsin looking for the girl while her photo was circulated online and on missing-person posters. The case shook the rural county where she lived, and residents of tiny Gordon were shocked to learn that she had been held captive there unnoticed.

Investigators said in a criminal complaint that Mr. Patterson, who was apparently not a suspect until the day he was arrested, told them he had carefully prepared for the abduction, and had killed Jayme’s parents with a shotgun stolen from his father so there would be no witnesses to help track him down. They said he spoke of slowing down on the highway to let police cars race by on their way to the Closs house as he drove away with Jayme in his trunk.

Jayme told detectives that Mr. Patterson kept her imprisoned in the cabin in Gordon, and confined her under a twin bed in his room when he left the cabin or when anyone else was there — sometimes for 12 hours at a stretch without a break to eat, drink or relieve herself.