ATMORE, Ala. -- A man convicted of killing a convenience store clerk more than two decades ago in Alabama was put to death Thursday night, the state’s second execution this year.

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 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.

Get Breaking News Delivered to Your Inbox

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.

U.S. Supreme Court justices had paused the execution twice earlier in the night 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.

The high court ruled late Thursday that the execution could proceed.

Smith was convicted of capital murder in the Nov. 8, 1994, shooting death 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.

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.

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.

“A juror’s sentencing decision is likely to be the only decision about criminal punishment he or she will ever make, and it will come at the end of an emotionally draining trial, which will often be the first and only such trial a juror will have seen,” lawyers for the state wrote.

Judge Lynwood Smith, now a federal judge, sentenced Smith to death. He likened the killing to an execution, saying the store clerk was beaten into submission before being shot in the head in a crime that left an infant fatherless. In overriding the jury’s recommendation, the judge also noted in court records that, unlike many other criminal court defendants, Ronald Smith came from a middle-class background that afforded him opportunities.

In a clemency petition to Gov. Robert Bentley, Smith’s lawyers said he was an Eagle Scout at 15 and was the son of a NASA contract employee whose life spiraled downward because of alcoholism and emotional scars from an abusive home environment.

Smith 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.