LOUISVILLE, Ky., (WDRB) -- An Illinois man spent seven months in a Kentucky prison after serving out his sentence and despite a judge's order releasing him, according to a federal lawsuit against state officials.

Described in the suit as an "unconscionable disaster," prison officials allegedly refused to credit Albert Jones with time he served before a 2010 robbery conviction, as stipulated in his plea agreement, which would have required his release by at least July 26, 2016.

On April 16, 2015, the lawsuit claims, Jefferson Circuit Court Judge Brian Edwards ordered the Kentucky Department of Corrections to give Jones credit for time he served before his conviction. The order was ignored, according to the suit. 

On Feb. 21, Edwards again ordered the state to give Jones credit for time served.

Still, according to the suit, Jones was not released from Northpoint Training Center in Burgin, Kentucky, until Feb. 27, seven months after he served out his sentence.

The suit, filed by Louisville attorney Aaron Bentley, claims corrections officials were "deliberately indifferent" to Jones' repeated notifications that he had served his time. The stipulation to give Jones credit for time he served before his conviction was worked out in his plea agreement, according to the suit. 

But prison officials refused to give Jones the credit and denied him a hearing, the suit claims. 

According to court records, Jones was sentenced to 10 years in prison April 22, 2010. In February, Edwards ordered that Jones be given credit for time he served before the guilty plea "in accordance with the plea agreement," according to court records. Jones was arrested for the robbery in 2008.

The lawsuit, naming several state correction officials, is seeking unspecified monetary damages and a jury trial.

A spokeswoman for the Department of Corrections did not immediately return a request for comment. 

Copyright 2017 WDRB News. All rights reserved.