After nearly 47 years, the Texas Court of Criminal Appeals this week exonerated Kerry Max Cook for the 1977 murder of Linda Jo Edwards, declaring him innocent of a crime for which he spent nearly 20 years on death row, according to Report, which cites CNN.

“This case is riddled with allegations of State misconduct that warrant setting aside Applicant’s conviction,” Judge Bert Richardson wrote in the court’s opinion delivered Wednesday, which said evidence favorable to Cook was withheld and that some of the evidence presented in his first trial in 1978 was later revealed to be false.

“And when it comes to solid support for actual innocence, this case contains it all — uncontroverted Brady violations, proof of false testimony, admissions of perjury, and new scientific evidence.”

The case encompasses three trials and multiple appeals, including to the US Supreme Court.

Cook was accused of the 1977 rape, murder and mutilation of 21-year-old Edwards in Tyler, Texas. She was found in her bedroom by her roommate, Paula Rudolph. Cook lived in the same apartment complex as the victim, leading to him becoming a suspect. A set of fingerprints on Edwards’ sliding patio door matched Cook.

Scientific analysis and expert testimony debunked the claim the fingerprints found on the patio door were “fresh.”

Cook was sentenced to death at his first trial in 1979, but his conviction was later overturned on appeal. The second trial in 1992 ended in a mistrial with the jury unable to meet a unanimous verdict. A third trial in 1994 ended with a new conviction and death sentence. The Texas Court of Criminal Appeals reversed the second verdict in 1996, stating misconduct by police and prosecutors.

In 1999, the results of DNA testing on Edwards’ underwear did not match Cook.

Edward Scott Jackson, an inmate at Smith County Jail and the star witness in Cook’s first trial testified Cook told him he had killed Edwards. He later recanted his testimony, saying, “I lied on him to save myself.” Jackson admitted he lied in exchange for a reduced sentence.

Before a fourth trial in 1999, the state offered Cook a “no contest” plea deal for murder. He was sentenced to 20 years and given credit for time served, leading to his release. However, his conviction stood.

Kerry Cook maintained his innocence through it all and has now been formally found innocent of Edwards’ murder.

“Kerry suffered immensely for nearly 50 years, and nothing can give him his life back,” one of Cook’s attorneys, Glenn Garber of the Exoneration Initiative, said in a statement to CNN.

“The decision finally and forcefully clears his name, and at the same time chronicles the State’s outrageous and unrelenting misconduct,” Garber said. “It is important for the people of Tyler, Smith County, and the world to understand this travesty of justice and see it for what it was all along – a disturbing witch hunt by state actors.”

CNN has reached out to the office of Smith County District Attorney Jacob Putman for comment, who took office in 2019. The appeals court ruling this week noted it did not hold current prosecutors “in any way responsible for the past events in this case.”