70-year-old has been on death row for 45 years. A Texas court just tossed his sentence

Raymond Riles, who was sentenced to death in 1976 in the fatal shooting of a used car dealer, had his sentencing dropped Wednesday.

The Texas Court of Appeals removed Riles’ death sentence because the jury was not advised to consider the now 70-year-old man’s mental health when deciding his punishment 45 years ago.

The case has been sent back to Harris County, where a court will once again determine Riles’ punishment in the 1974 crime.

“We’re very pleased,” Thea Posel, one of Riles’ attorneys, told The Texas Tribune. “It’s clearly established under Texas and [U.S.] Supreme Court law that Mr. Riles’ death sentence is unconstitutional.”

Riles was on Death Row longer than anyone in the United States, The Marshall Project reported earlier this year. He survived three canceled execution dates because he’s been deemed “too mentally ill to execute,” the nonprofit organization said.

Riles and Herbert Washington confronted John Thomas Henry in 1974 over a car they had purchased and shot him while robbing him of $42, the Associated Press reported. Washington took a plea deal and received sentences of 25 and 50 years, KTRK reported.

Riles’ attorneys claimed he was insane and used testimony from his family, as well as psychiatrists and psychologists, to back their claim, court records show.

“These witnesses collectively testified that (Riles) was often psychotic and had suffered for some time from some type of schizophrenia,” the court said. “They opined that (Riles) had been legally insane at the time of the offense and that his mental illness played a role in some of his violent behavior preceding the offense.”

But the jury rejected the insanity defense. The jury, which was not instructed to consider Riles’ mental illness, then had the option of sentencing Riles to death or life in prison. It agreed on a death sentence.

The appeals court said in Wednesday’s ruling it was “harmful” the jury was not asked to consider the mental health of Riles when making its decision.

A 1989 Supreme Court decision ruled “mental retardation” should be considered by a jury during sentencing. But before then, such instruction was not given for death penalty juries.

“The mental health evidence that (Riles) presented at his trial is the type of evidence that both this Court and the Supreme Court have come to regard as the kind of ‘two-edged’ mitigating evidence calling for a separate, mitigation focused jury instruction,” the judges said in their ruling. “(Riles’) jury did not receive any such instruction.”

Harris County District Attorney Kim Ogg said in February she supported Riles receiving a new punishment hearing.

“Death penalty law has evolved and now requires jurors to be able to meaningfully consider and weigh mitigation evidence about an offender such as childhood abuse and trauma,” Ogg said. “In 1976, Riles’ capital murder jury was not given this opportunity.”

Riles has lived in near-total solitary confinement and experts have deemed him “grossly psychotic, The Marshall Project said.

“Sometimes he describes himself as God or ‘King Moto-Cherry Velt-Love,’ according to The Marshall Project. “Other times he worries that he will be sacrificed to Satan by his demonic captors. He once set himself on fire.”