The US Supreme Court on Monday upheld the use of midazolam, a controversial lethal injection drug — meaning states can continue using the drug in their executions. In a 5-4 decision, the court concluded that petitioners didn't adequately prove that midazolam violates Eighth Amendment protections against cruel and unusual punishment. The case came about after Oklahoma botched the execution of Clayton Lockett, who appeared to groan and struggle for 43 minutes after the state injected him with lethal injection drugs.

The origins of the case

In 2014, it took the state of Oklahoma 43 minutes to execute Lockett. Observers reported that Lockett "struggled violently, groaned, and writhed" for a few minutes after executioners started the injection. After 20 minutes, Lockett was still alive, and the state stopped pumping the execution drugs into his IV. Lockett died 43 minutes after his execution began.

The death penalty is constitutional in the US, as long as states use a method that is relatively safe and relatively painless. In recent years, it's become harder — and arguably impossible — for states to meet that standard. States have faced a drug shortage as pharmaceutical companies have pulled out of (or been banned from exporting to) the execution market. With reliable injections no longer available, states are flying blind, testing unproven combinations — drugs that might cause a lot of pain.

The Court weighed in on whether states ought to be allowed to use unproven drugs as necessary experimentation, or whether they've crossed the line into cruel and unusual punishment. They concluded that the plaintiffs didn't prove that midazolam crossed the line into cruel and unusual punishment, and states can use the drug despite several botched executions involving it.

When does the death penalty count as "cruel and unusual punishment"?

Lethal injection is considered the most painless and humane way to kill someone, but it's riskier than other forms of execution (including the firing squad and the electric chair). Prisoners have filed constant lawsuits over whether the risk from various methods of lethal injection is great enough that it constitutes cruel and unusual punishment under the Eighth Amendment.

The last time the Supreme Court ruled on the death penalty was in Baze v. Rees, a 2008 case about Kentucky's lethal injection method. In that decision, the Court said that an execution method would be considered "cruel and unusual punishment" if it created a "substantial risk" that the prisoner would suffer unnecessary pain. But, it said, Kentucky's method didn't cross that line. And at the time, Kentucky used the same method as most other states: an anesthetic called sodium thiopental to knock out the prisoner, then a combination of lethal drugs to kill him while he was unconscious.

Chief Justice Roberts's opinion was clear that the anesthetic was what made the execution un-cruel. If not enough anesthetic was given, Roberts wrote, there would be a substantial — and "constitutionally unacceptable" — risk of a painful execution from the other two common drugs.

Lower courts haven't figured out exactly what counts as a "substantial risk" of pain when killing someone. But for several years, they didn't really have to. Most states used the method the Supreme Court had already endorsed in Baze. Now that's changed — these days, the Court-endorsed method was thought to be pretty much impossible. But the Supreme Court apparently didn't believe midazolam crossed the line into posing a "substantial" risk of pain or cruel and unusual punishment.

States now use experimental drug combinations to kill people

Sodium thiopental — the anesthetic that Chief Justice Roberts wrote was the key to an un-cruel execution — has become increasingly difficult to get in the US, as an activist campaign to stop companies from making the death penalty drug has taken hold. American drug manufacturers have stopped making it and European laws have banned exporting it, so states haven't been able to get the anesthetic since 2011. (Vox's German Lopez has explained the drug shortage.)

Since the drug only has a four-year shelf life, even states that had stocked up before the shortage hit are now being forced to find alternatives. Several of them have turned to a sedative called midazolam, which hasn't been approved for executions — and might not even work as an anesthetic at all. But many of the executions using new combinations of drugs — especially the ones involving midazolam — have gone disastrously, like the Lockett execution in Oklahoma. When someone is twitching and moaning on a gurney, as Lockett was, it seems plausible that he's in substantial pain. As the lawyers representing Oklahoma's current death row prisoners (who are the ones challenging the use of midazolam) wrote to the Supreme Court:

A prisoner will suffer severe pain if midazolam is used as the sole agent to induce and maintain a deep comalike unconsciousness. If midazolam cannot reliably protect against the pain of surgery, it also cannot reliably protect against the agony of suffocation, paralysis, and "liquid fire."

Oklahoma kept using midazolam after a horrific, 43-minute execution

Clayton Lockett's execution alarmed the public, and Oklahoma quickly put its executions on hold (including one that was scheduled to take place the same night as Lockett's) to figure out what had gone wrong. Other states have done the same thing after botched executions. But Oklahoma's investigation ultimately found that midazolam was still okay to use (it blamed improper placement of Lockett's IV for the botched execution instead).

So the state started up executions again, with a new execution chamber — but the same unproven drug.

In February, the Court agreed to take up the case of the three remaining inmates on Oklahoma's death row, who argued midazolam was too risky to be constitutional. There had originally been four inmates — the fourth had been executed the week before, after the justices denied his request for a last-minute stay.

So why take up Oklahoma's case? Partly, experts said, because the way the state plowed forward after the Lockett execution raises concerns about whether Oklahoma actually cared about avoiding "significant risk" of pain in executions. "Oklahoma had this botched experience, spent time studying what went wrong, and then said, 'Well, we can't find anything that clearly showed it went wrong, so we're just going to keep doing it this way,'" said Douglas Berman of Ohio State University. "That put off enough of the justices that they've wanted to really scrutinize what Oklahoma is doing."

But when the Supreme Court decided the case, it ultimately decided that there wasn't enough evidence to prohibit the use of midazolam.

The Court's liberals think execution experimentation has gone on long enough

The four justices on the Court's liberal wing — Stephen Breyer, Ruth Bader Ginsburg, Sonia Sotomayor, and Elena Kagan — are clearly concerned that the drug experimentation has reached a crisis point. (Two of them, Sotomayor and Kagan, weren't on the Court in 2008 for the Baze case, while Ginsburg dissented — so as many as three of them might disagree with the Court's current law on the death penalty, as well.)

All four voted to stay the February execution of Oklahoma's fourth death row prisoner. They're probably also the reason the Court looked at Oklahoma's method (only four justices need to agree to hear a case). And in oral arguments, they appeared sympathetic to the argument that Oklahoma, and perhaps other states, run a "substantial risk" of making prisoners suffer: Justice Kagan compared Oklahoma's method to burning someone at the stake. They're aware of the trouble states have had in finding execution drugs, but they don't appear to think that lets states off the hook for subjecting prisoners to cruel and unusual punishment.

CONSERVATIVE JUSTICES DON'T FEEL IT'S APPROPRIATE TO KEEP STATES THAT USE THE DEATH PENALTY FROM CARRYING OUT THEIR OWN LAWS

The conservative justices, meanwhile, feel anti-death penalty activists are being unfair. Instead of trying to attack the death penalty itself in court, the conservatives feel, activists are trying to abolish it by taking away states' options for executing people — what Justice Samuel Alito called "guerrilla war." The conservatives on the Court don't want to be in the business of micromanaging each state's execution methods. And they don't feel it's appropriate for them to help make it impossible for a state that uses the death penalty to actually carry out its own laws.

As a result, the conservatives don't appear to be pleased that the Court took the case up at all — making for an unusually shouty oral argument on both sides. In the conservative justices' opinion, the Supreme Court has ruled that the death penalty is constitutional as long as it's done humanely — and if the drug shortage has made it a lot harder to execute someone humanely, that is not the Court's problem to fix. But in Kagan's view, if states might be "burning people alive" with untested drugs, it's obviously a risk of cruel and unusual punishment and the Supreme Court obviously has to step in. And Oklahoma's actions have persuaded at least three others on the Court that they need to put an end to the era of experimentation.

Experts expected the ruling to be limited

Experts expected that all that rancor over the death penalty itself, and the role of the courts, wouldn't result in a broad or ideological opinion on the legitimacy of the death penalty — instead, they said the justices would probably stick to the case at hand in Oklahoma.

Ultimately, the court's opinion didn't address the broader issues of the death penalty. Instead, it simply continued the status quo — allowing states to continue the use of midazolam.