During his more than 30 years behind bars, Stanley Wrice insisted he was innocent, that Chicago police had beat him until he confessed to a rape he didn't commit. On Wednesday, he walked out of an Illinois prison a free man, thanks to a judge's order that served as a reminder that one of the darkest chapters in the city's history is far from over.

"It's just an overwhelming feeling of joy, happiness that finally it's over," said Wrice, who was greeted by his two daughters, his attorneys, and other supporters. He wore sweat pants, a dark jacket and baseball cap and carried a cardboard box filled with letters, photographs and legal papers — all of his possessions after three decades in prison.

Wrice, who was sentenced to 100 years behind bars for a 1982 sexual assault, is among more than two dozen inmates — most of them black men — who have alleged they were tortured by officers under the command of disgraced former Chicago police Lt Jon Burge in a scandal that gave the nation's third-largest city a reputation as haven for rogue cops and helped lead to the clearing of Illinois' death row. Some of the prisoners have been freed; some are still behind bars, hoping to get the kind of hearing that Wrice got that eventually led to his freedom.

Wrice's case went all the way to the Illinois Supreme Court before he got that hearing. But it marked a major victory for other inmates and former inmates, because the courts said that no matter what other evidence authorities have against a defendant, a coerced confession could never be dismissed as "harmless error." That means that if such a ruling is made, a case must return to the trial court, as was Wrice's, for a hearing.

In ordering Wrice set free and granting him a new trial, Judge Richard Walsh said Tuesday that two officers had "lied" about the way they'd treated Wrice, who testified that the officers beat him with a flashlight and a 20-inch piece of rubber. A witness testified that he, too, was beaten by the same officers until he agreed to give false testimony against Wrice at trial.

Wrice's case also may play a role in one in which defense attorneys are preparing to argue next week that a judge should certify inmates with claims of torture as a class so they can proceed with a class-action lawsuit. If the judge certifies the class, that would also trigger hearings for many of the inmates, according to attorney Locke Bowman and his co-counsel, Flint Taylor.

"Clearly the fact that Stanley has been granted a new trial underscores the importance of the class-action petition and I think it strengthens our argument," said Bowman, who is also director of the Roderick MacArthur Justice Center.

The city has already paid more than $80 million over the years in torture cases, but the total could rise significantly with a class-action lawsuit.

One of Taylor's clients is former prisoner Darrell Cannon, who claims he was tortured by the same two detectives who Wrice says beat him.

"They tortured him after they tortured Wrice," said Taylor, who said he was rushing to file a transcript of the judge's comments in Wrice's case into the court file in Cannon's case.

Wrice's attorneys would not commit to a lawsuit, other than to say he has a strong case. If the charges against him are ultimately dropped by a special prosecutor, a lawsuit is almost a certainty.

The special prosecutor, retired Judge Stuart Nudelman, has not said if he will do that and could not be reached for comment Wednesday. One of Wrice's attorneys, Heidi Linn Lambros, said prosecutors have a hearing scheduled for Thursday, and she believes it's likely they will dismiss the case.

Dozens of men have claimed that, starting in the 1970s, Burge and his officers beat, shocked and suffocated into confessing to crimes ranging from armed robbery to murder. The allegations of torture eventually helped prompt a moratorium on Illinois' death penalty, which was later abolished in Illinois. They also earned Chicago a reputation as a place where police could abuse suspects without notice or punishment.

No Chicago police officers were ever convicted of torturing suspects, but Burge is serving a 4 ½-year sentence for perjury and obstruction of justice for lying in a civil suit when he said he'd never witnessed or participated in the torture of suspects.