LOUISVILLE, Ky. — Applying the death penalty to defendants younger than 21 at the time of their crimes amounts to an “unconstitutionally disproportionate punishment,” a Kentucky judge has ruled.

Fayette County Circuit Judge Ernesto Scorsone’s ruling this week came in the case of Travis Bredhold, who was 18 years and five months old when he was charged in the 2013 slaying of a gas station attendant in Lexington.

Death penalty opponents hailed Scorsone’s ruling, but prosecutors vowed to appeal.

Fayette County Commonwealth’s Attorney Lou Anna Red Corn said Friday that the Lexington judge’s ruling was contrary to state and federal laws. She said the decision in Bredhold’s case will affect two other cases eligible for the death penalty that are pending before Scorsone. All three cases will be delayed as a result, she said.

Kentucky Attorney General Andy Beshear said his office will assist in the appeal.

“A decision of this magnitude needs to ultimately be reviewed by the Kentucky Supreme Court,” Beshear said in a statement.

Patrick Delahanty, chairman of the Kentucky Coalition to Abolish the Death Penalty, said the ruling reflects “a growing awareness that sentencing young defendants to death is not appropriate.” He called it a “logical next step in limiting the death penalty’s use in Kentucky.”

In a 2005 decision, the U.S. Supreme Court abolished capital punishment for juvenile offenders, ruling it is unconstitutional to sentence anyone to death for a crime committed while younger than 18.

In Bredhold’s case, his attorneys argued that the death penalty would be cruel and unusual punishment for a defendant under 21 at the time of their alleged offenses.

Prosecutors countered that Kentucky’s death penalty law is constitutional and that there’s no national consensus with respect to defendants under 21.

Scorsone disagreed, writing: “Contrary to the commonwealth’s assertion, it appears there is a very clear national consensus trending toward restricting the death penalty, especially in the case where defendants are 18 to 21 years of age.”

The judge pointed to research indicating that people under 21 are “categorically less culpable” in the same ways that the Supreme Court found teens under 18 to be.

“Given the national trend toward restricting the use of the death penalty for young offenders, and given the recent studies by the scientific community, the death penalty would be an unconstitutionally disproportionate punishment for crimes committed by individuals under 21 years of age,” Scorsone wrote.

“Accordingly, Kentucky’s death penalty statute is unconstitutional insofar as it permits capital punishment for offenders under 21 at the time of their offense,” he added.