ATMORE — A man convicted of killing a convenience store clerk more than two decades ago in Alabama was put to death Thursday night, after two brief delays by the U.S. Supreme Court.

Ronald Bert Smith Jr., 45, was pronounced dead at 11:05 p.m. after a lethal injection at the state prison in southwest Alabama. Smith heaved and he coughed repeatedly for the first 13 minutes of the 30-minute execution, clenching his fists and raising his head at the beginning of the procedure.

A prison guard performed two consciousness checks before the final two lethal drugs were administered. During the first one, Smith moved his arm. He raised his right arm again shortly after the second consciousness test.

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.

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

Smith replied, "No ma'am" when asked by the prison warden if he had any final words.

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.

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.

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.

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.