"The Supreme Court set aside a death sentence on Tuesday for a Texas inmate who as a 13-year-old could not tell time or name the days of the week, concluding he should not be executed in light of his mental disability.

In a 5-3 decision, the justices reversed the Texas state appeals court that had restored a death sentence given to Bobby James Moore, a 57-year old prisoner who shot and killed a store clerk in a botched robbery in 1980.

At issue was whether Moore had a mental disability that would make his execution "cruel and unusual punishment" under the 8th Amendment. The justices banned states from executing prisoners with a mental disability, but they left states some flexibility to set the standards.

But three years ago, the justices faulted Florida authorities for relying almost entirely on I.Q. scores.

In the Texas case decided Tuesday, the justices said state judges had ignored ample evidence that Moore had severe mental disability as a child. That evidence was not overcome by the fact that he had adapted well in prison, they said.

"At 13, Moore lacked the basic understanding of the days of the week, the months of the year and the seasons; he could scarcely tell time or comprehend the standards of measure," said Justice Ruth Bader Ginsburg. "After failing every subject in the ninth grade, Moore dropped out of high school. Cast out of his home, he survived on the streets, eating from trash cans, even after two bouts of food poisoning."

After fatally shooting the clerk in the 1980 robbery, he was sentenced to death.

The Texas courts reexamined his sentence after the high court abolished capital punishment in 2002 for defendants with a mental disability. A state judge listened to experts and set aside Moore's death sentence, But the state's criminal appeals court disagreed. Its judges said Moore had demonstrated "adaptive strength" by living on the streets and carrying out a robbery, and therefore did not qualify as having a severe mental impairment.

Ginsburg said the state judges had relied on an outdated understanding of mental disability, and her opinion in Moore vs. Texas said the state court must reconsidere its decision. Justices Anthony M. Kennedy, Stephen G. Breyer, Sonia Sotomayor and Elena Kagan agreed.

Chief Justice John G. Roberts Jr. dissented. While he agreed the state's authorities may have used outdated standards, Moore had I.Q. scores ranging from 69 to 79 that show he did not have the "significantly sub-average intellectual functioning" that would exempt him from the death penalty. Justices Clarence Thomas and Samuel A. Alito agreed. "