(CNN) -- Jake Patterson, who kidnapped 13-year-old Jayme Closs and killed her parents in Wisconsin nearly six months ago, fidgeted and wept as he pleaded guilty Wednesday to two counts of intentional homicide and a count of kidnapping.
After the hearing in Barron County Circuit Court, the bespectacled 21-year-old defendant -- wearing an orange jumpsuit -- blurted out, "Bye, Jayme." There were audible gasps from the crowd, which included members of the Closs family.
The defendant's father and sister also sat in court as Patterson told the judge that he agreed with and understood the plea that will likely keep him in prison for the rest of his life. He wept as he entered a plea to each count, with his lawyer leaning over to comfort him. Patterson tapped his foot nervously and, at times, his manacles rattled as he moved.
Under the plea agreement, a fourth charge of armed robbery was dismissed and state prosecutors declined to file charges for crimes committed in a neighboring county after the kidnapping.
A defense attorney told the court that Patterson wanted to plead guilty from the day he met him.
"He has been consistent that this is exactly what he wants to do," attorney Richard Jones said.
Sentencing will be on May 24. Each intentional homicide count carries a sentence of up to life in prison; kidnapping carries a term of up to 40 years.
Since his arrest in January, Patterson has communicated with TV journalists at least twice. In February, he sent a letter to a journalist for KARE-TV, reportedly expressing his remorse and saying he planned to plead guilty to murder and kidnapping charges. He called a reporter with WCCO earlier this month, telling her that he has regrets about what happened.
Patterson was accused of fatally shooting Jayme's parents in their home and kidnapping the teenager in October.
While driving to a cheese factory where he was a temporary employee, Patterson saw Jayme get onto a school bus, and "he knew that was the girl he was going to take," according to the criminal complaint.
Patterson said he had driven to Jayme's home in Barron twice "with the intent to kidnap" her, the complaint said. During the third time, on October 15, the suspect drove to her home, shot and killed her father, James Closs, at the door. Jayme and her mother, Denise Closs, hid in the bathroom, while her mom held the teenager in a bear hug.
Patterson barged into the home and broke down the bathroom door. He bound Jayme by her hands and ankles and put tape on her mouth. He then fatally shot her mother, the complaint states. He dragged Jayme out to the trunk of his car and headed back to his home, according to the complaint.
Her disappearance set off a massive search. Authorities say Patterson held Jayme captive for 88 days inside his cabin in the remote town of Gordon.
Jayme told detectives that Patterson would make her hide under his twin-sized bed in his bedroom when he had people over, including repeated visits from his father. The suspect told her that if anyone found out she was there, bad things would happen to her, the complaint states.
When she was under his bed, he stacked totes and laundry bins around it with weights stacked against them so he'd notice if she moved them, the complaint states.
Jayme "stated Patterson would make her stay under the bed for up to 12 hours at a time with no food, water or bathroom breaks."
On January 10, she escaped and asked for help from a woman walking her dog, who took her to a nearby home and called the police. Patterson was arrested shortly afterward. Prosecutors said he confessed in detail during an interview after his arrest.
What he told a journalist
In a letter to a journalist for KARE, Patterson said he had planned to come clean all along after he was arrested. The letter was in response to two previous letters the reporter said he sent to Patterson in jail last month with questions. CNN could not independently verify the authenticity of the letter.
"I knew when I was caught (which I thought would happen a lot sooner), I wouldn't fight anything," the letter said. "I tried to give them everything ... so they didn't have to interview Jayme. They did anyways and hurt her more for no reason."
He added that he planned to plead guilty to avoid a lengthy trial.
Under a question of whether he's remorseful, he described "huge amounts" of remorse and added, "I can't believe I did this. ... It was really stupid though looking back."
"The reason I did this is complicated," it said, followed by an apology in big letters.
"No one will believe or can even imagine how sorry I am for hurting Jayme this much. Can't express it. I'm Sorry Jayme! For everything. I know it doesn't mean much," the letter says.