The push for change comes because lethal injection, introduced 40 years ago as more efficient and humane than the electric chair or gas chamber, has not met that promise. Indeed, it has sometimes resulted in spectacles that rival the ones it was meant to avert.

One pitfall is that execution teams must find a vein to infuse, a process that can be excruciating. In February, an Alabama execution team gave up after trying for more than two hours on an inmate whose blood vessels had been damaged by chemotherapy and drug abuse. His lawyer accused the team of opening an artery and puncturing the prisoner’s bladder. The state later said it would not try again to execute him.

Lethal injection also involves drugs that, if given incorrectly, can result in suffering. One is a paralyzing agent, and the other stops the heart. The paralyzing drug was included in the original plan for lethal injection partly to make the process look peaceful and less disturbing to witnesses, by preventing the prisoner from thrashing around. Both it and the heart-stopping drug are supposed to be given after a powerful sedative has rendered the person unconscious, but if the sedative does not work properly, the other two drugs can cause significant pain.

Barbiturates were originally used for sedation, but manufacturers began refusing to sell them for executions. So states tried substituting other drugs. Some were ineffective and left prisoners moaning in what appeared to be prolonged agony.

Nebraska and Nevada hope to soon start using the opioid fentanyl as a sedative. Illegal use has made it a scourge of national death statistics, but medically it is an important painkiller and anesthetic. Defense lawyers in Nebraska have argued that fentanyl comes under a federal law that limits its distribution to lifesaving purposes, and that it is therefore illegal for a prison clinic to distribute it for an execution. A trial seeking information about the source of the fentanyl is scheduled for May 14.