CHICAGO (AP) — An Illinois appeals court on Wednesday vacated the conviction of an alleged Chicago police torture victim who has served nearly 25 years in prison for the 1990 robbery and murder of a cab driver.

In the ruling, the appellate court said the denial of Shawn Whirl’s successive post-conviction petitions by the Cook County Circuit Court was erroneous. The court ordered that Whirl receive a new suppression hearing and, “if necessary, a trial.”

Whirl was convicted in 1991 in the fatal shooting of Chicago cabdriver Billy G. Williams and sentenced to a 60-year prison term. Police were led to Whirl by fingerprints found on a passenger door of the cab in which Williams’ body was found.

In 2014, a judge denied Whirl’s petition for a new trial even though the Illinois Torture Inquiry and Relief Commission, formed to look into alleged Chicago police torture of criminal suspects, ruled Whirl’s confession had been coerced.

During the hearing, Whirl said he was slapped, stepped on, and subjected to racial slurs by a detective under the command of disgraced police commander Jon Burge. He said at one point, the detective used a set of keys to repeatedly scrape a wound on Whirl’s leg until it was bloody and raw.

“The torture Shawn experienced was despicable. We’re glad that the court of appeals recognized that it is never too late to correct an injustice,” said Tara Thompson, one of Whirl’s attorneys with The Exoneration Project of Northwestern University.

The Cook County state’s attorney’s office did not immediately return telephone calls for comment.

In its ruling, the appellate court noted Whirl has consistently claimed his confession was coerced. The court also noted that without Whirl’s confession, the state’s case was nonexistent, pointing out the cab was a public conveyance Whirl has never denied taking, adding no fingerprints were recovered from inside the cab.

The court also said the detective Whirl accused of torturing him had a long history of being involved in “abusing suspects in order to obtain confessions.” It pointed out that rather than denying Whirl’s allegations in court, the detective instead invoked his Fifth Amendment rights on the stand.

Thompson said Whirl, who is housed at Hill Correctional Center in Galesburg, knows the court ruling is only one step toward getting a new trial.

(TM and © Copyright 2015 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.)