For the second time, the U.S. Supreme Court has struck down the Texas Court of Criminal Appeals' way of determining if a death row inmate is intellectually disabled and therefore ineligible for execution.

The high court made that determination Tuesday in the case of Bobby Moore, whom the court decided is intellectually disabled.

Moore's case highlights the complexities surrounding intellectual disability and the death penalty. The Supreme Court has ruled that those with intellectual disabilities can’t be executed, and after reviewing Moore’s case in 2016, it tossed out the way the Texas court determines the disability in 2017. The Texas court previously relied on decades-old medical standards and a controversial set of factors created by judges to make the determination, including how well the inmate could lie.

After that ruling, the prosecutor sided with Moore and said that he is intellectually disabled, but the Texas Court of Criminal Appeals still disagreed, claiming last June that he was eligible for execution under current medical standards as well. Now, the high court has stepped in again, and this time, the majority of justices made clear that Moore has shown he is disabled and therefore ineligible for execution. The court's opinion knocked the Texas court for relying on the same methods it had ruled against in the 2017 opinion, like focusing on Moore's strengths instead of his weaknesses, especially strengths gained in a controlled prison environment.

The justices also said that despite the Texas court saying it had eliminated its controversial set of factors, which the high court said were problematic for advancing stereotypes, "it seems to have used many of those factors in reaching its conclusion."

"To be sure, the court of appeals opinion is not identical to the opinion we considered in Moore," the justices wrote. "There are sentences here and there suggesting other modes of analysis consistent with what we said. But there are also sentences here and there suggesting reliance upon what we earlier called 'lay stereotypes of the intellectually disabled.'"

Moore, 59, was sentenced to death more than 38 years ago after he fatally shot a 73-year-old clerk during a Houston robbery in 1980. In 2014, a Texas court determined under current medical standards that Moore was intellectually disabled — with evidence including low IQ scores and his inability to tell time or days of the week as a teenager.

But the Texas Court of Criminal Appeals overruled that decision, saying the lower court failed to use its test in making the determination. The Supreme Court invalidated that method upon review.

"By rejecting the habeas court’s application of medical guidance and clinging to the standard it laid out ... the CCA failed adequately to inform itself of the 'medical community’s diagnostic framework,'" Justice Ruth Bader Ginsburg wrote in the 5-3 opinion in 2017.

In an unusual step, the prosecutor — Harris County District Attorney Kim Ogg, a Democrat — filed a brief to the Texas court after that ruling stating that she agreed with Moore that he was intellectually disabled and should not be executed. In a surprise June opinion, the Texas Court of Criminal Appeals agreed to use current medical standards as a method to determine if a death row inmate had an intellectual disability but said that Moore still did not qualify.

Both Moore and Ogg took the matter up with the justices in Washington, D.C. — marking a rare occurrence of the state and inmate arguing for the same thing. They argued that the Texas court claimed to take up medical standards but largely did the same thing that the Supreme Court slammed earlier. They asked the Supreme Court to reverse the Texas court’s decision without holding a hearing, or if the justices didn’t agree to that, at least to grant a second review with oral arguments. The justices took the more drastic step.

Moore's case will now go back to the Court of Criminal Appeals for a new decision, but with the high court saying Moore has shown he is intellectually disabled, he would be ineligible for execution.

A difference in this ruling was a concurrence from Chief Justice John Roberts. In 2017, he dissented against the Supreme Court's reversal of the Texas court decision, claiming his colleagues' order on how states should determine intellectual disability "lacked clarity." On Tuesday, he said that problem still exists, but it's "easy to see" the Court of Criminal Appeals missed the mark.

"The court repeated the same errors that this Court previously condemned," he wrote.

Among the most conservative justices, Samuel Alito, Clarence Thomas and Neil Gorsuch dissented from the majority opinion, saying, as Roberts had, that the lack of clarity in how states should rule is the fault of the Supreme Court. They also criticized the majority for its "foray into factfinding" in making a decision on Moore's disability, as opposed to its role of judicial review.

The Texas Court of Criminal Appeals was left on its own in making these decisions. The Texas judges have begged the state Legislature for nearly two decades to come up with a process for determining whether death penalty defendants are intellectually disabled. This year, the few lawmakers who repeatedly file bills on the topic hope that Moore's case can make their legislation pass.

Elsa Alcala, who until January was a judge on the Court of Criminal Appeals and dissented against her colleagues in both of the Moore decisions, said Tuesday's ruling by the high court brought tears to her eyes.

"It feels like the weight of the world has lifted for a moment in time," she said.