A judge has overturned the rape conviction of a man who says Chicago police beat him into falsely confessing.

Stanley Wrice will be released on bail from prison after spending 30 years there. Defence Attorney Heidi Lambros says Cook County Judge Richard Walsh overturned Wrice's conviction Tuesday and granted him a new trial.

Lambros and the Illinois Department of Corrections say Wrice will be released Wednesday. He's been serving a 100-year prison sentence.

Stanley Wrice

Stanley Wrice is expected to be released on bail from the Pontiac Correctional Centre southwest of Chicago on Wednesday after a key witness Bobby Joe Williams testified that police detectives Jon Burge tortured him into falsely testifying against Wrice. Wrice, who has already served 30 years in prison, will get a new trial. (Illinois Department of Corrections/Associated Press)

Walsh's ruling comes two days after key witness Bobby Joe Williams testified detectives working for disgraced former Chicago police Lt. Jon Burge tortured him into falsely testifying against Wrice.

The officers who Wrice says beat him invoked their right not to testify.

Burge is in federal prison after being convicted of perjury related to torture allegations.