The U.S. Supreme Court on Thursday temporarily blocked Alabama's execution of a man for the 1994 murders of three fast-food workers during a late-night robbery.

Alabama had planned to put Robert Melson, 46, to death by lethal injection on Thursday evening at its death chamber in Atmore. If the execution goes ahead, it will be the 13th this year in the United States and the second in Alabama in 2017.

"Upon consideration of the application of counsel for the applicant, it is ordered that execution of the sentence of death is hereby stayed pending further order of the undersigned or of the court," stated a document signed by Supreme Court Justice Clarence Thomas and released on Thursday evening.

Lawyers for Melson have tried to halt his execution, arguing that a drug in the state's lethal injection mixture has been linked to troubled executions in Alabama, Arizona and Oklahoma, where inmates could be seen twisting on death chamber gurneys.

They said the drug, the sedative midazolam, does not render a person sufficiently unconscious for surgery and its use violated constitutional protections against cruel and unusual punishment.

Last week, a federal appeals court in Atlanta issued a stay of execution for Melson because of the drug issue.

Alabama appealed, and the Supreme Court on Tuesday lifted Melson's stay, allowing the execution to proceed.

Justice Thomas' latest order temporarily blocking the execution came after Melson's attorneys submitted new arguments related to the drug issue.

Melson was convicted of murdering James Nathaniel Baker, 17, Darryl Collier, 23 and Tamika Collins, 18, during a robbery at a fried chicken fast-food restaurant in Gadsden, about 115 miles northwest of Montgomery.

As the restaurant was closing around midnight, Melson and another robber forced four employees to remove cash from the restaurant safe and then ordered them into a freezer, court summary documents said.

Melson fatally shot three of the workers while the fourth, Bryant Archer, was shot multiple times but survived, the documents said.

Archer identified one of the robbers as Cuhuatemoc Peraita, a former employee at the restaurant, but did not know the shooter, they said. Police later linked Melson to Peraita, who was 17 at the time of the killings and too young to be executed under U.S. law.

Peraita was sentenced to life without parole. While in prison, he killed another inmate and currently is on death row, according to court records.

(Reporting by David Beasley; Additional reporting by Alex Dobuzinskis in Los Angeles and Jon Herskovitz in Austin; Editing by Bill Trott and Jonathan Oatis)