The Supreme Court sided on Tuesday with a Texas death row inmate who claims he should not be executed because he is intellectually disabled.

The justices, by a 5-3 vote, reversed a Texas appeals court ruling that held that inmate Bobby James Moore was not intellectually disabled.

Justice Ruth Bader Ginsburg said in her majority opinion that Texas' top criminal appeals court ignored current medical standards and required use of outdated criteria when it decided Moore isn't mentally disabled. That ruling removed a legal hurdle to Moore's execution for the shotgun slaying of a Houston grocery store clerk in 1980.

The decision was the second this term in which the high court has ruled for a Texas death row inmate. In February, the justices said race improperly tainted inmate Duane Buck's death sentence.

Chief Justice John Roberts dissented, along with Justices Samuel Alito and Clarence Thomas.

The Supreme Court held in 2002 that people convicted of murder who are intellectually disabled cannot be executed. The court gave states some discretion to decide how to determine intellectual disability. The justices have wrestled in several more recent cases about how much discretion to allow.

In 2014, the court ruled unconstitutional a Florida law that barred any other evidence of intellectual disability if an inmate's IQ was over 70.

Texas looks at three main points to define intellectual disability: IQ scores, with 70 generally considered a threshold; an inmate's ability to interact with others and care for him- or herself and whether evidence of deficiencies in either of those areas occurred before age 18.

The case is Moore v. Texas, 15-797.