A clerk recorded his sentence for assaulting a prison guard as one to be served concurrently with his preexisting eight-year sentence

Receive the latest national-international updates in your inbox

This undated photo released by the Colorado Department of Corrections shows paroled inmate Evan Spencer Ebel. Ebel, 28, is the man who led Texas authorities on a 100 mph car chase that ended in a shootout Thursday, March 21, 2013, and has been linked to the slaying of Colorado's state prison chief. (AP Photo/Colorado Department of Corrections)

Updated at 10:28 AM CST on Tuesday, Apr 2, 2013

A clerical error allowed the man suspected of killing Colorado's prisons chief to be released from custody about four years early, officials said Monday.

In 2008, Evan Spencer Ebel pleaded guilty in rural Fremont County to assaulting a prison guard. In a plea deal, Ebel was to be sentenced to up to four additional years in prison, to be served after he completed the eight-year sentence that put him behind bars in 2005, according to a statement from the 11th Judicial District.

Deputy Recovers After Shootout with Evan Ebel

Montague County Sheriff's Deputy James Boyd talks about being shot three times at point-blank range by Evan Spencer Ebel during a traffic stop. Ebel, who is suspected in the slaying of Colorado prison's chief Tom Clements, was shot and killed after a chase that ended in a crash in Wise County. (Published Tuesday, Mar 26, 2013)

However, the judge did not say the sentence was meant to be "consecutive," or in addition to, Ebel's current one. So the court clerk recorded it as one to be served "concurrently," or at the same time. That's the information that went to the state prisons, the statement said.

So on Jan. 28, prisons officials saw that Ebel had finished his court-ordered sentence and released him.

Two months later he was dead after a shootout with authorities in Texas. The gun he used was the same used to shoot and kill prisons chief Tom Clements two days earlier. Police believe Ebel also was involved in the death of a Domino's delivery man, Nathan Leon, in Denver.

NBC 5 Viewer Captures Decatur Shootout on Camera

"The court regrets this oversight and extends condolences to the families of Mr. Nathan Leon and Mr. Tom Clements," said a statement signed by Charles Barton, chief judge of the 11th Judicial District, and court administrator Walter Blair.

Corrections officials said they had not calculated precisely the number of days Ebel would have remained behind bars had the sentence been consecutive. They said they had no way of knowing the plea deal was intended to keep Ebel behind bars for years longer.

The attack that led to the plea deal took place in 2006. According to prison and court records, Ebel slipped his handcuffs while being transferred from a cell and punched a prison guard in the nose, also threatening to kill the guard's family. Ebel spent much of his time behind bars in solitary confinement and had a long record of disciplinary violations.