The U.S. Supreme Court has halted the execution of an Alabama inmate whose attorneys argue that dementia has left the 67-year-old unable to remember killing a police officer three decades ago.

Justices issued a stay Thursday night, the same evening that Vernon Madison was scheduled to receive a lethal injection at a southwest Alabama prison. The court delayed the execution to consider whether to further review the case.

Madison was sentenced to death for the 1985 killing of Mobile police Officer Julius Schulte, who had responded to a call about a missing child made by Madison's then-girlfriend. Prosecutors have said that Madison crept up and shot Schulte in the back of the head as he sat in his police car.

Madison's attorneys argued that strokes and dementia have left Madison unable to remember killing Schulte or fully understand his looming execution. The Supreme Court has previously ruled that condemned inmates must have a "rational understanding" that they are about to be executed and why.

"We are thrilled that the court stopped this execution tonight. Killing a fragile man suffering from dementia is unnecessary and cruel," attorney Bryan Stevenson, of the Equal Justice Initiative, said Thursday after the stay was granted.

The Alabama attorney general's office opposed the stay, arguing that a state court has ruled Madison competent and Madison has presented nothing that would reverse the finding.