Death penalty opponents were horrified on Tuesday when Nebraska became the first state in the union to carry out an execution using the painkiller fentanyl, which has been a driving force of the deadly opioid epidemic.

Some critics objected to the use of “a drug that’s currently ravaging our communities and killing thousands of Americans a year,” as Democratic New York City Council Speaker Corey Johnson put it on Twitter. Others, like American Civil Liberties Union attorney Brian Stull, argued that the lethal protocol for Carey Dean Moore’s death was “cruel and unusual punishment” since the state paralyzed him before injecting the fentanyl, making it harder to know if Moore felt pain.

Nebraska's unprecedented move is part of a broader pattern of states turning to new methods of execution, or reviving old ones, as a backup. This is happening because more and more of the companies producing and supplying traditional lethal injection drugs want to keep their products from being used for capital punishment.

“The Nebraska development reflects the trend among states that want the death penalty to be carried out at any cost,” says Robert Dunham, executive director of the Death Penalty Information Center. “As states have become increasingly desperate to carry out executions, they’ve been going to whatever drugs they can get their hands on.”

All 31 death penalty states have lethal injection as their default method of execution, but some have recently legalized backup methods. In March, Alabama approved nitrogen gas, which was already allowed in Oklahoma and Mississippi for cases where lethal injection is unconstitutional or unavailable. In 2015, Utah brought back the firing squad, which is also permitted in Oklahoma and Mississippi as a last resort after lethal injection, nitrogen and electrocution.

A decade ago, executions almost uniformly involved the anesthetic sodium thiopental. But then the drug’s sole manufacturer, Hospira, discontinued the product so it couldn’t be used on death-row inmates. Many states turned to pentobarbital -- until the company supplying that drug, Lundbeck, stopped shipping it to prisons.

“They don’t want the drugs they’ve developed to help people to kill people,” Dunham says of these companies. “The marketers want the drugs to be known for healing and saving lives.”

Some companies are waging legal battles, arguing that states have obtained their products improperly or illegally. Nevada, for instance, would have been the first state to administer a death sentence with fentanyl, but a judge halted the execution following the objections of a drug company earlier this summer.

Echoing the drug companies' concerns, Dunham says there is “a dangerous, anti-democratic trend” in which states are “making the process less transparent, preventing the public and drug companies from learning how they’re obtaining the drugs.”

Nebraska officials haven’t explained how they arrived at using fentanyl, but they have stressed how hard it is to buy execution drugs, reports The Washington Post.

“Lethal substances used in a lethal injection execution are difficult, if nearly impossible, to obtain,” Nebraska Department of Correctional Services Director Scott R. Frakes said in an affidavit filed in federal court, according to the Post.

Many conservatives are frustrated by the drug companies' crusade against capital punishment. In 2015, conservative Supreme Court Justice Samuel Alito asked whether it was “appropriate for the judiciary to countenance what amounts to a guerrilla war against the death penalty, which consists of efforts to make it impossible for the states to obtain drugs that could be used to carry out capital punishment with little, if any, pain?”

Indeed, part of the appeal of lethal injections is that they’re supposed to be humane. But many of the procedures have been botched in recent years, putting condemned prisoners through excruciating pain in their last moments. Alternatives, like gassing, present their own problems, says Dunham.

“Whatever gas chamber you use will always invoke the spectre of the Nazis," he says, "which is why that method is so unpalatable to much of the public." (States that have legalized nitrogen gas as an execution method have yet to set their protocols for administering it, including whether to use sealed chambers or death masks.)

This week’s fentanyl execution came as nationwide support for the death penalty is on the rise -- though still lower than it’s been for most of the past two decades. In June, the Pew Research Center found that 54 percent of Americans favor the death penalty for people convicted of murder. That number was 49 percent in 2016, the lowest level of support in four decades.

Six states have outlawed the practice since 2007. Despite that, the Trump administration has responded to the opioid crisis in part by directing federal prosecutors to seek the death penalty for some drug dealers. If they live in Nebraska, what lands them on death row could be what is used to kill them.