WASHINGTON — The Supreme Court ruled Monday that an Alabama prisoner on death row for more than 30 years can be executed despite having no memory of his crime.

The justices, without any noted dissents, reversed a federal appeals court ruling that had struck down Vernon Madison's death sentence for killing a police officer. The lower court said that because Madison had suffered strokes in prison and could not remember the crime, he could not make sense of his punishment.

But the Supreme Court ruled that there is a difference between condemned inmates who cannot recall their crimes and those who cannot "rationally comprehend the concepts of crime and punishment." They said under federal law, Madison's lawyers had not proved he was incapable of understanding that.

State and federal courts had upheld the death sentence on that basis, but the U.S. Court of Appeals for the 11th Circuit reversed those decisions.

The Supreme Court, however, said the state court reasonably "determined that Madison is competent to be executed because — notwithstanding his memory loss — he recognizes that he will be put to death as punishment for the murder he was found to have committed."

Three of the court's more liberal justices — Ruth Bader Ginsburg, Stephen Breyer and Sonia Sotomayor — agreed. But they said the court has never ruled on the specific question of memory loss and should hear such a case in the future.

Breyer wrote separately to repeat his concerns, first aired in a 2015 case, that the death penalty may be unconstitutional. Among many reasons, he said Madison's imprisonment on death row since the 1985 murder means he has lived with the specter of death for 32 years, which he said "can deepen the cruelty of the death penalty while at the same time undermining its penological rationale."

More:Executions rise in 2017, but downward trend continues

More:Does the death penalty serve a purpose? Supreme Court hasn't decided either