ATMORE, Ala. — A man who killed an Alabama convenience store clerk more than two decades ago was put to death Thursday night, in an execution that required two consciousness tests as the inmate heaved and coughed 13 minutes into the lethal injection.

Ronald Bert Smith Jr., 45, was pronounced dead at 11:05 p.m., about 30 minutes after the procedure began at the state prison in southwest Alabama.

Smith was convicted of capital murder in the Nov. 8, 1994, fatal shooting of Huntsville store clerk Casey Wilson. A jury voted 7-5 to recommend a sentence of life imprisonment, but a judge overrode that recommendation and sentenced Smith to death.

This undated photo provided by the Alabama Department of Corrections shows Ronald Bert Smith Jr.. Smith, who was executed late Thursday, Dec. 8, 2016 for the 1994 slaying of a Huntsville store clerk. AP

Smith heaved and coughed repeatedly, clenching his fists and raising his head at the beginning of the execution. A prison guard performed two consciousness checks before the final two lethal drugs were administered. During the first one, Smith moved his arm. He slightly raised his right arm again after the second consciousness test.

Related: Supreme Court Upholds Controversial Lethal Injection

The meaning of those movements will likely be debated. One of Smith's attorneys whispered to another attorney, "He's reacting," and pointed out the inmate's repeated movements.

The state prison commissioner said he did not see any reaction to the consciousness tests.

"We do know we followed our protocol. We are absolutely convinced of that," Alabama Corrections Commissioner Jeff Dunn said Thursday evening. "There will be an autopsy that will be done on Mr. Smith and if there were any irregularities those will hopefully be shown or born out in the autopsy. I think the question is probably better left to the medical experts," Dunn said when asked if the movement's indicated the state's process should be changed.

Alabama uses the sedative midazolam as the first drug in a three-drug lethal injection combination. Smith and other inmates argued in a court case that the drug was an unreliable sedative and could cause them to feel pain, citing its use in problematic executions. The U.S. Supreme Court has upheld the use of the drug.

Smith replied, "No ma'am" when asked by the prison warden if he had any final words. A member of Wilson's family, who was not identified, witnessed the execution. The victim's family did not make a statement.

Wilson was pistol-whipped and then shot in the head during the robbery, court documents show. Surveillance video showed Smith entering the store and recovering spent shell casings from the bathroom where Wilson was shot, according to the record.

In overriding the jury's recommendation at the 1995 trial, a judge liked the slaying to an execution, saying Wilson had already been pistol-whipped into submission and Smith ignored his pleas for mercy. Wilson had a newborn infant at the time of his death.

"The trial court described Smith's acts as 'an execution style slaying.' Tonight, justice was finally served," Alabama Attorney General Luther Strange said in a statement after the execution.

U.S. Supreme Court justices twice paused the execution as Smith's attorneys argued for a delay, saying a judge shouldn't have been able to impose the death penalty when a jury recommended he receive life imprisonment.

Four liberal justices said they would have halted the execution, but five were needed to do so.

Smith's attorneys had urged the nation's highest court to block the planned execution to review the judge's override.

Smith's lawyers argued a January decision that struck down Florida's death penalty structure because it gave too much power to judges raises legal questions about Alabama's process. In Alabama, a jury can recommend a sentence of life without parole, but a judge can override that recommendation to impose a death sentence. Alabama is the only state that allows judicial override, they argued.

"Alabama is alone among the states in allowing a judge to sentence someone to death based on judicial fact finding contrary to a jury's verdict," attorneys for Smith wrote Wednesday.

Lawyers for the state argued in a court filing Tuesday that the sentence was legally sound, and that it is appropriate for judges to make the sentencing decision.

Smith, the son of a NASA contract employee, became an Eagle Scout at 15, but his life spiraled downward because of alcoholism, according to a clemency request to Alabama's governor. He had a final meal of fried chicken and french fries and was visited during the day by his parents and son.

Alabama has been attempting to resume executions after a lull caused by a shortage of execution drugs and litigation over the drugs used.

The state executed Christopher Eugene Brooks in January for the 1993 rape and beating death of a woman. It was the state's first execution since 2013. Judges stayed two other executions that had been scheduled this year.