Jerry Hartfield, 59, has been in prison since 1977 even though his original murder conviction was overturned in 1980. On Wednesday, a Texas jury found him guilty of the crime for a second time.

In 1977, a jury convicted Hartfield, who is black, of the 1976 rape and murder of Eunice Lowe, a white 55-year-old bus-station ticket agent in Bay City, Texas. Three years later, Texas’s highest criminal appeals court overturned the conviction, citing jury selection issues, and ordered a retrial—an order the prosecution fought for years. Before that retrial began, however, then-Texas Governor Mark White commuted Hartfield’s death sentence to life imprisonment in 1983.

There was only one catch: Because Hartfield’s original conviction had been vacated, he legally had no death sentence for the governor to commute. But since no one realized this at the time, or for decades afterward, Hartfield stayed in prison and served the commuted life sentence without retrial. My colleague Andrew Cohen described how every part of the criminal-justice system failed Hartfield when he wrote about the case in 2013:

Texas prosecutors thought that the governor's commutation resolved the issue, at least until someone challenged the commutation for failing to supersede the mandate of reversal. The state judges in 1983 reckoned that the mandate had been issued, and that if the case weren't properly resolved they would soon hear about it from prosecutors or defense counsel. And Hartfield's lawyer says that he stopped representing his client when the commutation came through. Everyone dropped the ball on Hartfield, who after 32 years in prison still has never received a parole hearing even though he's long been entitled to one.

Hartfield, who reportedly has an IQ of 51, did not realize he was serving a life sentence until a jailhouse lawyer discovered the error in 2006. When Hartfield petitioned for release that year, prosecutors fought it, and state courts refused his request. But in June 2013, the Texas Court of Criminal Appeals ruled that Hartfield was indeed in prison without a sentence. Prosecutors then announced their intention to retry him—more than three decades after his original sentence was tossed out—and kept him in prison until then.

In 2014, a state judge ruled that Hartfield’s Sixth Amendment right to a speedy trial had not been violated during his 35-year incarceration because he had not sought out a new trial. His new trial began earlier this month, and he was found guilty of the murder Wednesday. As The Guardian notes, holding a retrial for a murder that took place almost four decades ago posed major challenges:

Hartfield’s attorneys said the murder weapon could not be found and Lowe’s car no longer existed. Many of the more than 125 people on the prosecution’s witness list are dead or could not be found and some witness testimony from the 1977 trial was read into the retrial. Wooten said that meant he could not cross-examine them, raising questions about the fairness of the retrial.

The Associated Press reports jurors chose not to convict Hartfield of capital murder, which would have led to an automatic life sentence. He could not be resentenced to death because the Supreme Court abolished the death penalty for the intellectually disabled in 2002. The de facto minimum IQ for execution is 70; Hartfield’s IQ is well below that. He instead faces five to 99 years in prison, though he may be immediately eligible for parole if his 35 years of incarceration are counted as time served.