Ending a startling miscarriage of justice spanning nearly four decades, a judge in Cleveland, Ohio has exonerated a man convicted of aggravated murder after the only prosecution witness in his trial came forward and admitted he made up his testimony.

Ricky Jackson, who is now 59, is expected to be released on Friday after spending 39 years in prison for the killing in May 1975 of a money-order collector in Cleveland. He and two other men, who were brothers, were found guilty by a jury based on the testimony of a 12-year-old boy.

But at a hearing in Cleveland this week that witness, Eddy Vernon, who is now 51, stepped forward and confessed that, in fact, he never saw the attack and that the details of what happened had been fed to him by police. He was told that his parents would be arrested if he changed his story.

“Everything was a lie. They were all lies,” Mr Vernon told Judge Richard McMonagle. He had been on a school bus at the time of the killing and other witnesses came forward to say he could not have seen the murder directly. The prosecution case had rested entirely on his words.

“The scale of the miscarriage of justice in Ricky Jackson’s case is staggering,” Clive Stafford Smith, the head of Reprieve, a London-based charity that defends prisoners’ rights. He is currently involved in a similar hearing trying to exonerate British-born Kris Maharaj, who has been incarcerated in Florida for nearly 30 years for a double murder he says he didn’t commit.

“Much of what went wrong in Mr Jackson’s case is very familiar: a witness coached by the police into a version of events that would gain an easy conviction; a woeful lack of reliable evidence linking him to the crime; inept lawyering, especially for poor people; a jury or judge not willing to countenance doubt; and a ‘justice’ system where, once convicted, it becomes nearly impossible to overturn a sentence.”