Vernon Madison, 67, has spent over three decades on death row for killing Corporal Julius Schulte, a police officer in the city of Mobile.
Madison appeared to leave his girlfriend's home after retrieving his belongings, but then crept up behind Schulte as he sat in his patrol vehicle and shot him twice in the back of the head with a.32-caliber pistol. Madison was also accused of shooting his girlfriend, who survived. At his third trial, he argued self-defense. The U.S. Supreme Court later opened the way for the execution to proceed.
A law enacted in Alabama past year eliminates the ability of judges to override juries' recommendations in capital cases.
The court, in an unsigned 2017 opinion, said testimony showed Madison "recognizes that he will be put to death as punishment for the murder he was found to have committed", even if he doesn't remember the killing itself.
His death by lethal injection was planned for 18:00 local time on Thursday and would have been the second scheduled execution in the United States this year.
In prior appeals, Madison's attorneys have argued their client doesn't fully understand why he is being punished because dementia has taken his ability to remember his crime. They say he no longer understands why he's being executed.
In November, the US Supreme Court agreed with a state court ruling that Madison was mentally competent.
Madison's lawyers asked Gov. Kay Ivey for clemency.
In 2016, the Atlanta-based 11th US Circuit Court of Appeals ruled that Madison was no longer legally eligible to be executed because of his memory loss.
The Supreme Court has previously ruled that condemned inmates must have a "rational understanding" why they are being executed.
They argue that executing someone with dementia is counter to how society treats vulnerable citizens.
Meanwhile, death row inmate Doyle Lee Hamm, who killed a Cullman hotel employee during a robbery in 1987, is scheduled to be executed February 22.
Before his execution was stayed, Madison had two oranges for his last meal and did not made any statements, officials said.