Allgier was accused of shooting and killing corrections officer Stephen Anderson during a hospital visit at the University of Utah Medical Center on June 25, 2007.
Prosecutors alleged that Allgier grabbed the guard's gun and shot him during the medical visit, and then stole a car to get away.
He was caught after a police chase and hostage situation at an Arby's restaurant on 1700 South Redwood Road.
In court on Wednesday, Allgier admitted to being a cop killer.
Judge: "How do you wish to plead to count one of the second amended information in the murder of capital felony? Guilty or not guilty?
In all, Allgier admitted guilt to all 8 counts related to the 2007 shooting death of prison guard Steven Anderson.
For five years, Allgier fought the charges.
But Wednesday he gave up his fight saying he wanted to bring closure to the Anderson family.
Allgier told the judge "If it brings the Anderson family closure, yes."
“The plea agreement he agreed to, he's doing this out of respect for the Anderson family,” says his attorney Dusty Kawai.
Anderson's family rushed through a back door, refusing to comment.
But Maxine McNeeley who claims to be Allgier's close friend was relieved his life was spared.
“Life in prison in a little box is suffering enough,” McNeeley says. “I'm sorry for the Anderson family for their loss.”
Salt Lake's District Attorney says when he took office 18 months ago his goal was to settle the case.
“There were a lot of technical issues,” Sim Gill says. “We had to get through those.
That included making sure all eight counts Allgier was charged with were not dismissed. In exchange he says the death penalty was removed from settlement.
“Three weeks ago we put the offer on the table,” he says.
And then there was the Anderson family. Gill says they were kept in the loop and learned they didn't want the death penalty either.
"The system isn't perfect,” Gill says. “But today in this courthouse with this family we retrieved the best justice that we could and justice was served."
Allgier faced 8 separate counts connected to the escape attempt and death of Anderson. He pleaded guilty to 5 of those counts, including first-degree felony counts of disarming a peace officer, aggravated escape, aggravated robbery, and second-degree felony possession of a firearm by a restricted person.
He pleaded "no contest" to 3 others, including three counts of first-degree felony attempted aggravated murder.
The plea deal means Allgier will spend the rest of his life in prison without the possibility of parole. Prosecutors had previously sought the death penalty against Allgier.
Since the 2007 incident, Allgier has been involved numerous courtroom maneuvers, including several attempts to fire his defenders and represent himself.
Allgier will be sentenced on December 5.
Stay tuned to ABC 4 News and ABC4.com for more on this story.