The execution of Clayton Lockett went wrong right from the very start.

An inexperienced nurse struggled to insert a needle into a vein into which the cocktail of deadly drugs would flow. Instead, his femoral vein, located deep below the surface of the groin, was punctured repeatedly and drugs did not enter directly into the bloodstream.

Strapped in the gurney, Lockett, convicted of shooting and burying alive a 19-year-old woman, writhed, kicked his legs, breathed heavily and even managed to gasp a word: “Man.” He took 43 minutes to die, rather than the usual ten.

Charles Warner

Another death row inmate, Charles Warner, was to have have been executed the same night. Instead it was postponed nine months.

When he was eventually put to death in January, he took 18 minutes to die and when asked to give his last works he said that the needle inserted into hurt like acid.

“My body is on fire,” said Warner, convicted in 1997 of the sexual assault and murder of an 11-month old girl.

In July 2014, convicted killer Joseph Wood III died one hour and 57 minutes after his execution began in Arizona. Death penalty experts said it was one of the longest times it has taken in the United States for drugs to kill a condemned man, but officials insisted the execution as not “botched”.

In January 2014, Dennis McGuire struggled and heaved and tried to speak as an untested combination of chemicals were pimped into his body. “He started making all these horrible, horrible noises, and at that point, that’s when I covered my eyes and my ears,” his daughter, Amber McGuire, later told reporters.

These incidents, and others like them, were at the heart of the case that was decided by the Supreme Court on Monday and which involved the use of the sedative midazolam, which is largely untested for such uses.

Execution by lethal injection usually involved a combination of three drugs –an anaesthetic, a paralytic and thirdly potassium chloride, stops the heart.

For many years, the anaesthetic of choice was sodium thiopental. But a US manufacturer halted production of the drug, states that carried out execution sought to obtain it elsewhere. That supply was halted by the efforts of campaigners opposed to the death penalty, leaving many US states scrambling to find an alternative.

States such as Florida and Oklahoma set upon midazolam. Officials from the state argued that it was an effective drug, while lawyers for three condemned Oklahoma prisoners claimed the drug combination used had been shown to have unexpected consequences and argued that it would cause them pain and suffering that was unconstitutional.

On Monday, the court ruled 5-4 that the use of the drugs was constitutional.