New York has abandoned the death penalty – and none too soon, given the number of wrongfully convicted people who have been exonerated – but not all states agree. Those states bear a special burden: They have to be able to carry out their executions fairly, legally and without torturing the prisoner. That seems increasingly hard to do.

Oklahoma is only the most recent state in which an execution went horribly wrong, though few instances have been as shocking as the state’s bungled execution of Clayton D. Lockett. The exact reasons that Lockett writhed in apparent agony before dying of a massive heart attack are unknown, and may never be known because the investigation of the state’s actions is being conducted by the state itself.

State officials have said the reason for the catastrophic failure of the execution was that the needles placed into Lockett’s arms damaged his veins and didn’t allow the proper amount of paralyzing agent to be delivered. But the problem could also be the drugs themselves. The source of the chemicals used on Lockett isn’t known because Oklahoma, like other states that use lethal injection, is having difficulty acquiring them. So the states are turning to suppliers they refuse to identify.

However, beyond that, how would it be possible for those conducting the execution not to notice that the drugs weren’t being delivered properly?

Oklahoma and other states with capital punishment need to be serious about this issue. To ensure that executions do not violate the Constitution’s prohibition of cruel and unusual punishment, details of the procedures need to be public. States can’t be allowed to hide them. And when a state botches an execution, the state shouldn’t be the one to investigate.

That, perhaps, is one of the most shocking aspects of this case. An Oklahoma judge had ruled that the execution was unconstitutional because the nature of the drugs was being kept secret. Horrified, a state lawmaker threatened to impeach any judges who tried to block the execution. The judge’s stay was vacated and Oklahoma went on about killing a man in a gruesome a manner. And thus, justice was politicized.

None of this is to excuse or defend Lockett, a vicious criminal who was convicted of shooting a woman and then burying her alive. Presuming that he was justly and fairly convicted, his crime merited the harshest punishment allowed. In Oklahoma, that means execution.

But, as Douglas A. Berman, an expert on sentencing law and policy at Ohio State University, told the New York Times, “There’s a reasonable modern consensus that death alone should be our maximum punishment, not a torturous death.”

Even that consensus is fraying, as an increasing number of states halt executions or debate the issue. Things change slowly in a big democracy, and so it is with capital punishment. But what cannot be tolerated – what needs to change immediately – is the shameful secrecy with which some states are trying to cloak their killing procedures, and any level of tolerance for states that can’t get this right.

If that can’t happen, then the U.S. Supreme Court will need to take notice of a system that is becoming increasingly unusual and that is betraying the distinctive earmarks of cruelty.