In “Case in Point,” The Marshall Project examines a single case or character that sheds light on the criminal justice system. An audio version of Case in Point is broadcast with The Takeaway , a public radio show from WNYC, Public Radio International, The New York Times and WGBH-Boston Public Radio.

When Jerry Hartfield walked out of the Hutchins State Jail in Dallas on Monday into the sunlight and the arms of his family, he became one of the most unlikely prisoners ever to be freed early in Texas. He wasn’t exonerated or released on parole. He wasn’t pardoned by the governor. No one else has confessed to the murder for which he was convicted in 1977. No DNA cleared him. No witness recanted. No celebrities pleaded his cause.

Hartfield was freed from prison because Texas finally gave up trying to find a valid reason to keep him there. He had waited 35 years between trials without a conviction, a prisoner simply forgotten for decades in the state’s massive justice system.

He was supposed to get a new trial in 1980 after an appeals court reversed his conviction and death sentence because of a flaw during jury selection. Instead, after a series of misunderstandings and miscommunications by lawyers, judges, and jailers — who all thought Hartfield was someone else’s problem — he never got that second day in court. If it were not for a fellow prisoner and the public defenders who eventually discovered the mistake, the 61-year-old intellectually disabled man likely would have died alone in his cell, his story as lost as he was.

Texas officials first botched Hartfield’s case because no one understood the complexities of the state’s procedural laws. Then, when the problem was discovered in 2006, a new generation of Texas officials relied on those same complexities to keep Hartfield in prison for another 11 years. In the end, the second delay prompted a court to order Hartfield’s release earlier this year. It was the state’s very zealousness that ended up freeing Hartfield.

In an interview with The Marshall Project just after he was released, Hartfield said he holds no animosity for the state lawyers whose arguments kept him confined for so long.

“I am not bitter. I am not angry. They were only doing their jobs, and I respect them for that,” he said on the phone from the home of a relative just hours after he was released. For the attorneys and advocates who helped free him, he had nothing but gratitude. “It is a blessing that God placed them in my life,” he said. “I am just overwhelmed.”

The story starts in 1976 with the murder and sexual assault of Eunice Lowe, a white woman whose body was found in the bus station where she had worked in Bay City, near Houston. Hartfield, a black man from Kansas, was quickly arrested — his fingerprints were on a Dr. Pepper bottle found at the station — and he confessed to the crime. Confessed, that is, the way a black man with an IQ later found to be in the 50s or 60s could ever legitimately confess to anything in the South in the 1970s. It didn’t take jurors long to convict him and sentence him to death. Hartfield says today that he was coerced into confessing. He has always maintained his innocence.

On Sept. 17, 1980, four years to the day after the murder, the first unusual thing happened to Hartfield. The Texas Court of Criminal Appeals ordered him retried because prosecutors had improperly dismissed a juror over her reservations about the death penalty. But instead of holding a new trial, prosecutors tried for three years to convert Hartfield’s death penalty to a life sentence. They failed. So, in 1983, the Texas appeals court again ordered a new trial.

That’s when the second unusual thing happened to Hartfield. Shortly after the ruling, the governor commuted Hartfield’s death sentence to life in prison. Prosecutors thought the commutation effectively resolved the case in their favor, but they were wrong. The appellate judges believed their order for that second trial was being followed by prosecutors. They were wrong. The governor’s staff thought the commutation ended the litigation. They were also wrong.

Everyone assumed that someone else in some other part of the justice system had taken care of Hartfield’s case. Hartfield’s trial attorney, who later testified that he believed the commutation was ineffective, never pressed the issue. Maybe he and his client both figured they would wait to see how it played out. And so Hartfield sat in prison for another 23 years, until 2006, when he finally began to figure out that something may have gone wrong.

The right to a speedy trial is enshrined in the Sixth Amendment, but like every other part of the Bill of Rights, it has been subjected to a great deal of conflicting interpretations — so much so that even delaying a trial for decades doesn’t automatically mean a violation of constitutional rights.

Once Hartfield started asking questions, no judge or lawyer knew precisely what to do. Evidently, no one had ever seen such an extraordinary delay between the time a court ordered a new trial and the time a defendant asked for one. The governor’s 1983 commutation was a complication that made the procedural tangle even worse. But for years, one judge after another simply wallowed in that tangle, each refusing to cut through it to either set Hartfield free or get him his new trial.

Prosecutors, meanwhile, blamed Hartfield for the long delay in asking for a new trial. They apparently hoped the embarrassing mistake would simply fade away with time.

It did not. Between 2006 and 2007, with the help of a fellow inmate named Kevin Althouse, Hartfield made three requests to state judges for help. “Kevin Althouse made it all possible,” Hartfield told me. “God introduced me to him. Told me to give him all my paperwork.” Althouse drafted simple requests on Hartfield’s behalf. Each time, however, judges summarily rejected his claims. There was something automatic in the way these rulings came down, without any written analysis or explanation, almost as if the jurists never even considered the arguments. To them, perhaps, he was just another confessed murderer trying to get relief on some hoary technicality.

Realizing he was getting nowhere with the state courts, Hartfield asked the federal courts to get involved. First, a federal judge assigned Hartfield a public defender. Then, in 2009, the judge acknowledged that the governor’s 1983 commutation was irrelevant and that Hartfield had been imprisoned all those years without any conviction. It was a major milestone in the case. But then this judge merely transferred the case to another federal judge who, in 2011, rejected Hartfield’s claims because, the judge wrote, Hartfield had failed to exhaust his state remedies.

It was a classic Catch-22: state judges hiding between procedural hurdles and federal judges deferring to those state judges. So Hartfield took his case to a federal appeals court, which acknowledged, too, that he was imprisoned without a valid conviction. But that court also refused to intervene directly. Instead, in 2012, the federal appeals court asked the state’s highest criminal court to figure out precisely what Hartfield’s status was and what he could do about it.

In 2013, 30 years after it had ordered Hartfield to get his new trial, the Texas Court of Criminal Appeals acknowledged at last that Hartfield had been improperly imprisoned for all those years. But it, too, refused to order him released or retried. Instead, the case was reassigned to a another judge, who again ordered a new trial. That judge concluded that Hartfield was to blame for the long delay in asserting his rights and he had not suffered much by waiting all those years. Even though the state was negligent in pursuing Hartfield’s retrial, the judge found there was no bad faith that would require punishing the state by releasing Hartfield.

So Hartfield was retried in August 2015. If anything, the second trial highlighted the flaws of the first one. Two key witnesses who had testified against Hartfield in 1977 had died, so their original testimony was read into the record. Hartfield’s new trial lawyers obviously could not cross-examine them.

None of the physical evidence — the pickaxe that was allegedly used in the murder, a car allegedly used by Hartfield, or DNA from the victim — was still around. Jurors could not hear mitigating evidence from Hartfield’s family since most of them had also died. None of this mattered. Jurors convicted Hartfield again, and a judge sentenced him to life in prison. Prosecutors got what they wanted, only 35 years later.

But that is not where this story ends. Hartfield and his attorneys appealed the trial judge’s ruling, arguing his constitutional right to a speedy trial had been violated and he should be released. And this time the Texas Court of Criminal Appeals, as much a player as a referee in this case, finally rescued Hartfield. In a January ruling, the court ruled that Hartfield’s speedy trial rights had been violated and in a manner in which only his release could remedy. The delay was obviously profound, and the state’s conduct during that time could not be described merely as negligence, the court found.

The court didn’t credit Hartfield for the 23 years from 1983 until 2006 when he remained silent about his lack of a new trial. That was his fault, the judges concluded. But it did credit him for speaking up from 2006 to 2013. That, finally, was enough to sustain a claim. And enough to get him released. The irony is thick. By arguing over technicalities in a case of such obvious injustice state attorneys sabotaged their own cause.

Which brings us to Monday. Hartfield’s first meal was homemade red beans and ham hocks and cornbread and pecan pie, he told me. And there was a long shower, perhaps the best shower of his life, and some new clothes he wore as he walked freely from room to room in the house in which he’s staying without having to wait for some guard to unlock a door. And a nap. Jerry Hartfield took a nap Monday afternoon, which means Jerry Hartfield must have woken up shortly thereafter and wondered if it all had been a dream.

Hartfield says he found God during those long years of incarceration with the help of chaplains and nuns and other spiritual advisors. He says he wants to go back into those prisons when he gets back on his feet and use his faith and his story to talk to other inmates, to try to “prevent them from making the same mistakes I made in life.” It won’t be easy on the outside. He received little job or career training all those years because everyone presumed he was serving a life sentence with no chance of parole. Then again, his life story is right there in the first lines of a famous hymn: I once was lost but now am found.