Hanging is perhaps the quintessential American punishment. In the pre-revolutionary era, criminals were also shot, pressed between heavy stones, broken on the wheel, or burned alive. (An estimated 16,000 people have been put to death in this country since the first recorded execution, in 1608.) But the simplicity of the noose triumphed, and its use spread as the republic grew.

In theory, a hanging is quick and relatively painless: the neck snaps immediately. But hangings can be grisly. If the rope is too short, the noose will slowly strangle the condemned. If the rope is too long, the force of the fall can decapitate the person.

The Supreme Court has never struck down a method of execution as unconstitutional. But states have at times tried to make the process more humane. “Hanging has come down to us from the dark ages,” New York Governor David B. Hill told the state legislature in 1885. He asked “whether the science of the present day” could produce a way to execute the condemned “in a less barbarous manner.”

Thomas Edison offered up his Menlo Park laboratory for New York officials to test electrocution on animals. Confident that the method would be painless and instantaneous, state legislators abolished hanging and mandated the use of the electric chair for all death sentences, starting in 1890. Other states slowly followed, although hanging never truly disappeared—the most recent one took place in Delaware in 1996.

Despite their scientific veneer, new methods had their own pitfalls. When Nevada performed the first execution by lethal gas in 1924, prison officials initially considered pumping the gas into the inmate’s cell while he slept. They opted instead to build an airtight chamber, but it was initially so chilly inside—just 49 degrees—that the gas pooled ineffectually on the floor.

Electrocution also proved to be far from foolproof. In 1946, Louisiana’s electric chair, set up by a guard and an inmate who were drunk, failed to kill 17-year-old Willie Francis, who had been convicted of murder. “I am not dying!” he screamed as he writhed. Francis appealed to the Supreme Court and argued that another turn in the electric chair would constitute cruel and unusual punishment. He lost his case, 5–4, and the state’s second attempt to electrocute him worked.

In 1972, the Supreme Court halted all executions in the U.S., ruling that state death-penalty statutes were too arbitrary. Four years later, the justices upheld revised statutes, and capital punishment resumed. Soon after, an Oklahoma legislator asked Jay Chapman, the state’s chief medical examiner, to help create a method to replace electrocution. Chapman, who once described himself as “an expert in dead bodies but not an expert in getting them that way,” devised a three-drug cocktail of sodium thiopental, pancuronium bromide, and potassium chloride. If administered via intravenous injection, he said, it would anesthetize and paralyze an inmate and then stop his heart. Texas was the first state to use lethal injection, in 1982; by the 1990s, the method was widespread. (Some states were reluctant to give up electrocution, however. Florida kept its aging electric chair running through the 1990s, even after two inmates’ heads caught fire.)

If lethal injection goes—whether because states can’t find execution drugs or because the Supreme Court strikes it down—what will replace it? Some states have already begun bringing back old methods in case they need an alternative. Tennessee is reviving the electric chair, and Oklahoma has authorized the use of lethal gas. In March, Utah reauthorized firing squads after abandoning them in favor of lethal injection 11 years ago.