WASHINGTON – The Supreme Court sided Tuesday with a Texas convict who claimed his intellectual disability makes him ineligible for the death penalty.

The high court reversed for the second time a Texas court's ruling that Bobby James Moore could be executed despite his cognitive deficits. In doing so, a majority of justices said Texas relied on "lay stereotypes of the intellectually disabled."

Chief Justice John Roberts joined the court's unsigned opinion, which was opposed by conservative Associate Justices Samuel Alito, Clarence Thomas and Neil Gorsuch. It appeared that the vote was 6-3, with Associate Justice Brett Kavanaugh also joining the majority, since he did not join the dissent.

The court originally ruled in 2017 that Texas – the nation's leader in executions – cannot use a decades-old definition of intellectual disability to determine who lives and who dies. The justices sent the case back to the Texas Court of Criminal Appeals, but that court refused to change its original ruling.

"The court repeated the same errors that this court previously condemned" by emphasizing Moore's adaptive strengths, rather than his deficits, Roberts said in the opinion released Tuesday. "That did not pass muster under this court’s analysis last time. It still doesn’t."

The three dissenters said Texas did its best to comply with the Supreme Court's last ruling, which they said failed to set clear guidelines for judging intellectual disability.

"The error in this litigation was not the state court’s decision on remand but our own failure to provide a coherent rule," Alito wrote.

The decision was another in a series of high court rulings intended to eliminate differences in how states decide who is disabled – and therefore ineligible for the death penalty under a 2002 precedent – and who is not.

Justice Ruth Bader Ginsburg wrote the earlier 5-3 decision, backed by the court's liberal members and Justice Anthony Kennedy, who has since retired. Speaking from the bench at the time, she said Supreme Court precedent does not allow for the "disregard of current medical standards."

Roberts joined Alito and Thomas in 2017 in arguing that Moore failed to prove the intellectual deficits necessary for a holding that the death penalty would be a cruel punishment.

"Clinicians, not judges, should determine clinical standards," Roberts wrote, "and judges, not clinicians, should determine the content of the Eighth Amendment."

Moore's case dates back to 1980, when he shot and killed a grocery store clerk during a botched robbery. He was twice convicted, then found to be intellectually disabled, but Texas' highest criminal court overturned that finding, citing its own precedent, which is based on a 1992 definition of intellectual disability.

The Supreme Court has tightened sentencing rules for people with intellectual disabilities since its landmark 2002 ruling in Atkins v. Virginia. In 2014, it barred Florida from using a single, strict IQ standard to determine a prisoner's competency.

Texas claimed it met the relevant standards for judging intellectual disability, having looked at Moore's intellectual functioning, adaptive behaviors and age of onset. But Cliff Sloan, Moore's attorney, said the state used lay stereotypes – such as the character Lennie in John Steinbeck's "Of Mice and Men."

More:Justice Ruth Bader Ginsburg returns to Supreme Court bench two months after surgery for lung cancer

More:Supreme Court refuses to hear defamation lawsuit against Bill Cosby by one of his accusers

More:Supreme Court will rule on Trump administration's effort to add question on citizenship to 2020 Census