States cannot rely only on IQ scores to determine a convicted murderer’s eligibility for the death penalty, the U.S. Supreme Court has ruled.

The decision affects laws in Florida, Kentucky, Alabama and Virginia, where officials have sentenced individuals to death even though they may be developmentally disabled. Several other states might also have to adjust their sentencing practices in response to the ruling.

“Intellectual disability is a condition, not a number,” Justice Anthony Kennedy, joining the Court’s four more liberal members, wrote for the majority in the 5-4 ruling. “Courts must recognize, as does the medical community, that the IQ test is imprecise.”

The decision was based on the Florida case of Freddie Lee Hall, who was convicted in 1981 of murdering a 21-year-old pregnant woman. Hall was given IQ tests three times, the results of which ranged from 71 to 80.

Florida’s death penalty law made anyone with a score of 71 or higher eligible for execution. The state Supreme Court acknowledged Hall’s “serious mental difficulties,” but let his sentencing stand.

Kennedy, however, took exception to Florida’s rule, saying it disregarded “established medical practice in two interrelated ways. It takes an IQ score as final and conclusive evidence of a defendant’s intellectual capacity, when experts in the field would consider other evidence. It also relies on a purportedly scientific measurement of the defendant’s abilities, his IQ score, while refusing to recognize that the score is, on its own terms, imprecise.”

Kennedy added: “The death penalty is the gravest sentence our society may impose. Persons facing that most severe sanction must have a fair opportunity to show that the Constitution prohibits their execution. Florida’s law contravenes our nation’s commitment to dignity and its duty to teach human decency as the mark of a civilized world.”

Lee’s case exposed his early upbringing, which included being raised “under the most horrible family circumstances imaginable,” according to a Florida sentencing court. One of 17 children, Lee was starved, bound, beaten, buried up to his neck and threatened with a gun by his mother on separate occasions.

The Hall ruling was the first of its kind since the Supreme Court found in 2002 (Atkins v. Virginia) that executing the mentally retarded violated the Constitution’s prohibition against cruel and unusual punishment.