The Supreme Court on Monday unanimously reversed a lower court that had found an Alabama death row inmate ineligible for execution because his declining health had left him unable to remember the murder he had committed.

The justices said that since the Supreme Court has never found that a prisoner is incompetent to be executed because of a failure to remember his crime — as opposed to being able to comprehend the concepts of crime and punishment — the U.S. Court of Appeals for the 11th Circuit had erred in stopping Vernon Madison’s execution.

Three of the court’s liberal members said that was a question worth the court’s time but agreed that Madison’s case did not provide the proper vehicle for that examination.

And Justice Stephen G. Breyer said the case illustrated a different issue: how long waits for the enforcement of death sentences have created a class of aging death row inmates who present new constitutional questions about capital punishment.

In April 1985, Madison shot Mobile, Ala., police officer Julius Schulte twice in the back of the head after Schulte responded to a domestic call. Efforts to execute Madison, now 67, for the crime have dragged on for decades.

“He has lived nearly half of his life on death row,” Breyer wrote. “During that time, he has suffered severe strokes, which caused vascular dementia and numerous other significant physical and mental problems. He is legally blind. His speech is slurred. He cannot walk independently. He is incontinent. His disability leaves him without a memory of his commission of a capital offense.”

Breyer, who in the past has tried to interest the court in reexamining whether the death penalty can be applied constitutionally, said the average wait on death row for the 21 people who have been executed in 2017 is 19 years.

“Given this trend, we may face ever more instances of state efforts to execute prisoners suffering the diseases and infirmities of old age,” he said. “And we may well have to consider the ways in which lengthy periods of imprisonment between death sentence and execution can deepen the cruelty of the death penalty while at the same time undermining its penological rationale.”

No other justice joined Breyer’s concurrence, and no conservative justice rebutted him. In the past, they have alleged that it is the numerous appeals and creativity of defense lawyers that have postponed the imposition of the death penalty.

Madison’s case is unusual. As his execution neared in 2016, his attorneys said that several recent strokes had impaired his memory and that he no longer remembered his crime.

At a hearing, a psychologist for the state said Madison “suffered a significant decline post-stroke” but “certainly” understood that Alabama was seeking to execute him for the murder he committed.

But a psychologist testifying on Madison’s behalf said that although the inmate knew the state wanted to execute him, he did not recall “the sequence of events from the offense to his arrest to the trial or any of those details.”

A state court denied Madison’s petition, saying that under Supreme Court precedent, he was entitled to relief only if he could show that his mental illness prevents him from “understanding he is being executed as punishment for a crime.”

A panel of the federal appeals court disagreed. With no dispute that Madison does not remember the crime, the panel said in a 2-to-1 decision, he “does not rationally understand the connection between his crime and his execution.”

That is the decision that the Supreme Court said Monday was wrong. In an unsigned opinion, the justices said the appeals court exceeded its authority under the federal law — the Anti-terrorism and Effective Death Penalty Act of 1996 — that governs review of death sentences.

It says federal courts may get involved only when the lower court’s decision was contrary to clearly established federal law or unreasonably applied it. The justices said there was no precedent that clearly established that an inmate must remember the commission of his crime.

“The state court did not unreasonably apply [Supreme Court precedents] when it 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,” the court wrote.

The justices added they “express no view on the merits of the underlying question.”

Breyer and Justices Ruth Bader Ginsburg and Sonia Sotomayor wrote in a concurrence that the question — whether a state may execute someone who does not remember his crime — warrants “full airing.”

But they agreed that the “restraints imposed” by the AEDPA preclude that in this case.

The case is Dunn v. Madison.