A Texas man facing trial for the murder of an elderly St. Paul woman in 2017 pleaded guilty Monday to a lower count, sparing himself the possibility of life in prison despite a judge's apparent skepticism about his truthfulness.

Richard Joles, 31, pleaded guilty in Ramsey County District Court to first-degree aggravated robbery. Charges of aiding and abetting first-degree murder, aiding and abetting second-degree murder with intent and aiding and abetting second-degree murder without intent will be dropped as part of his plea.

Joles agreed to a 12-year prison term for his role in the Jan. 2, 2017, robbery and beating death of Myong Ki Gossel, a 79-year-old widow who delivered home-cooked meals to neighbors and paid large sums of cash for yard work.

"Nothing like this was supposed to happen," Joles told the court after denying several times that he beat Gossel.

Ramsey County District Judge George Stephenson pressed him after a frustrated Assistant Ramsey County Attorney Thomas Hatch asked Joles how his fingerprints ended up on Gossel's jewelry box and filing cabinet.

"There are a bunch of folks who cared about this lady who, for almost two years, have been in pain waiting for justice to be served," Stephenson said. "The truth is not going to add a single day" to your sentence.

But Joles was adamant that he didn't lay a finger on Gossel despite the prosecution's earlier assertions that Joles had confessed to a fellow inmate that he participated in beating Gossel.

Asked why the county accepted Joles' plea, the Ramsey County Attorney's Office issued this statement, in part, "The agreement carries an upward departure at sentencing and provides a measure of closure to the victim's family."

Evidence showed that while high on methamphetamine, Joles; his girlfriend's brother, Perrin Cooper Jr.; and Joles' former brother-in-law, Kevin Reek; drove from Indiana to St. Paul to extort Gossel. Joles had previously performed yard work for her and had obtained $20,000 from her before Christmas 2016.

Jurors convicted Reek earlier this month of first-degree murder and second-degree murder for killing Gossel based on evidence that his DNA was found on her sweatshirt and in her home.

Cooper, who pleaded guilty to simple robbery, testified at Reek's trial that he and Joles left Reek at a Wisconsin gas station and went to Gossel's home and obtained $350.

Joles said his fingerprints were deposited during that visit.

"I was being greedy," he said, adding that he looked around while Cooper distracted Gossel.

Reek was enraged, Cooper testified at Reek's trial, and made them take him to Gossel's home in the 2300 block of Nokomis Avenue.

Joles testified Monday that he drove them back and pointed out Gossel's house, even though he knew that Reek had been convicted of tying up and beating homeowners, and Reek had said he planned to smack Gossel around.

Cooper testified at Reek's trial that on the second visit, the three men left without entering her home. But, Cooper said, Reek and Joles both disappeared later that day.

Joles provided no clarity for his whereabouts during the time Reek ransacked Gossel's home, dragged her into her basement and killed her. But Joles told the court he didn't go back inside the house a second time.

Joles also pleaded guilty to third-degree assault for punching Reek last year while the two were in a holding cell together. He accepted a two-year prison sentence, which will run concurrent with his sentence in the Gossel case.

Joles is scheduled to be sentenced on Dec. 10. His trial was scheduled to begin Tuesday.

Twitter: @ChaoStrib