Mr. Hartfield, a black man, signed a confession that he later disavowed, and, crucially, investigators said he told them where to find Ms. Lowe’s car. Experts placed his I.Q. in the 50s or 60s, which his lawyers contend made him easily coerced by detectives, and unable to understand his rights or his confession.

A jury convicted him and he was sentenced to death. But the Court of Criminal Appeals later overturned that verdict, ruling that a potential juror had been improperly dismissed for having doubts about the death penalty, and ordered a new trial. After years of legal wrangling, the high court ruling took effect in March 1983.

Under Texas law at the time, prosecutors had a way to avoid a retrial and preserve the conviction — but only if they acted within a time frame set by the court. Because the trial error had to do with capital punishment, if the governor commuted the sentence to life in prison, then it would be as if the appellate court had never ruled, and the guilty verdict would remain in effect.

That was apparently never communicated to the prison system. Mr. Dow said that Mr. Hartfield thought he was awaiting a new trial, but did not have the capacity to understand the delay or what to do about it.

Whether the District Attorney’s Office understood what had happened at the time is unclear, but it never took steps to retry him, and the case lay dormant for the next 23 years. Prosecutors have argued that Mr. Hartfield had legal representation all along, because his original defense team remained his lawyers of record until a court formally dismissed them in 2013. But Mr. Hartfield’s new lawyers say he had no legal counsel from 1983, when the original team thought they were done with the case, until a federal court appointed a lawyer in 2008.

Starting in 2006, a fellow inmate helped Mr. Hartfield file motions in various courts. Some were rejected outright, and at least one apparently went to the wrong office. One federal judge ruled in his favor, but another said he had to keep trying in state court.

Finally, in 2013, Texas’ Court of Criminal Appeals ruled that Mr. Hartfield’s conviction and life sentence were void, but his motions were also void. The motions were filed under a law applying to people who have been convicted, the court said, and there was no valid conviction on record in his case. He refiled under a different provision, and prosecutors finally sought a new trial.