An Oklahoma inmate unexpectedly died Tuesday night after prison authorities attempted his execution by lethal injection. The execution was called off after the full dosage of drugs had been administered and the prisoner regained consciousness and began seizing. Following the incident, a second execution scheduled to take place later that night was called off.

Clayton D. Lockett was the first prisoner to be killed by a controversial new drug cocktail, the legality of which had been contested by his attorneys. Lockett’s execution, and that of another prisoner, Charles Warner, had been delayed by the State Supreme Court after the inmates’ attorneys filed civil suits seeking to identify the source of the drugs. An Oklahoma lawmaker drafted legislation to impeach the justices because of their decision. The high court later backtracked and rejected the prisoners’ requests for a delay.

According to the Department of Corrections, Lockett was declared unconscious 10 minutes after the first drug was administered. Three or four minutes later, he started writhing, mumbling and trying to lift his head. A doctor discovered that Lockett suffered a blown vein as the second and third drugs—a paralyzing agent and a lethal dose of potassium chloride—were being administered.

‘Blowing a vein’ is an expression for puncturing or tearing a vein while attempting to insert an I.V. device, which is a common medical error even for skilled nurses with years of experience.

The first drug administered during the botched execution was 100 milligrams of midazolam; around 50-100 times what would normally be given to sedate a hospital patient before a procedure. Midazolam falls into a class of drugs known as benzodiazepines, commonly used for the treatment of anxiety, and is also used for minimal sedation. The overdose should prevent the prisoner from feeling pain, while also potentially suppressing their respiratory functions and causing acute cardiovascular complications.

There are no anesthesia guidelines for sedating someone with the amount of midazolam used during execution. No doctor would ever give a patient a dose that high (unless death was the intention), so there’s no medical research to show that it’s an effective drug with which to execute a person. The only known use as a first drug in a three-drug protocol was during a 2013 execution in Florida; however, the dose given in that case was five times higher. In this light, the event seems more like a failed medical experiment.

Witnesses described being horrified by the scene, including one of Lockett’s attorneys, Dean Sanderford, who told the New York Times, “It looked like torture.” Sanderford reportedly sat quietly and cried as Lockett’s body began bucking under the gurney’s restraints. Ziva Branstetter, who attended the execution as a media witness, said she heard the prisoner speak after he’d been declared unconscious by the physician—another indication that the sedation phase of the untested drug protocol failed.

As news of the botched execution spread, Twitter began to light up with disgust:

Don't write tonight off as a freak accident. Tonight is simply the American death penalty doing its usual work of degrading humanity.

Potassium chloride, the third and final drug used in the execution cocktail, normally requires special handling by doctors and nurses when administered intravenously. The solution is hypertonic, meaning only a very small amount—far less than what Lockett received—can be safely administered into the peripheral veins. If he were awake at any time, Lockett may have felt something like the equivalent of fire flowing through his arm, exacerbated by the fact that his vein had been torn.

Just watched a botched execution in which inmate Clayton Lockett had a violent reaction. He was declared dead from a heart attack.

The blinds separating the viewing room and the execution chamber were lowered shortly after the doctor discovered Lockett’s blown vein, which prevented the media from observing how the prisoner continued to react to the combination of drugs. According to Branstetter, the press was informed of Lockett’s death after being rushed from the room to a waiting prison van. Patton was unable to tell reporters how exactly how much of the drugs had been used during the execution

Lockett was convicted of the 1999 shooting of Stephanie Nieman, a 19-year-old girl who walked in on a home burglary. He was charged with later observing as two other men buried her alive.

Warner, who was scheduled to be executed after Lockett using the same drug protocol, was convicted of raping and killing an 11-month-old girl, though he maintains his innocence. His execution has been postponed by Governor Mary Fallin for the next 14 days while the Department of Corrections conducts a full review of the state’s execution procedures.