Vernon Madison was convicted in the 1985 killing of a police officer.
Vernon Madison was convicted in the 1985 killing of a police officer.

(CNN)The US Supreme Court has granted a stay of execution for an Alabama inmate whose dementia, his lawyers say, prevents him from remembering the murder he was convicted of committing decades ago.

Alabama had planned to put Vernon Madison, 67, to death on Thursday night, but less than a half hour before the execution was to take place, Justice Clarence Thomas issued a temporary stay.

About two and a half hours later, the high court announced that a stay had been granted while the court decides what to do with an appeal from the defense.

Madison has been convicted three times in the shooting of Mobile police Cpl. Julius Schulte, who was responding to a April 1985 domestic disturbance call. Madison, who was on parole, sneaked up behind Schulte and shot him twice in the head, according to court documents. He also shot his girlfriend, who survived her wounds.

At his first and second trials, Madison argued that he was not guilty because he was mentally ill. At…