Utah became the only state to allow firing squads for executions Monday when Gov. Gary Herbert signed a law approving the controversial method's use when no lethal-injection drugs are available.

Herbert has said he finds the firing squad "a little bit gruesome," but Utah is a capital punishment state and needs a backup execution method in case a shortage of the drugs persists.

"We regret anyone ever commits the heinous crime of aggravated murder to merit the death penalty, and we prefer to use our primary method of lethal injection when such a sentence is issued," Herbert spokesman Marty Carpenter said. "However, when a jury makes the decision and a judge signs a death warrant, enforcing that lawful decision is the obligation of the executive branch."

The measure's approval is the latest illustration of some states' frustration over bungled executions and difficulty obtaining the drugs. Utah is one of several states seeking new forms of capital punishment after a botched Oklahoma lethal injection last year.

States have struggled to keep up their drug inventories as European manufacturers opposed to capital punishment refuse to sell the components of lethal injections to U.S. prisons. The Texas deadline is the most imminent, but other states are struggling, too.

The bill's sponsor, Republican Rep. Paul Ray of Clearfield, argued that a team of trained marksmen is faster and more decent than the drawn-out deaths involved when lethal injections go awry — or even if they go as planned.

Though Utah's next execution is probably a few years away, Ray said wants to settle on a backup method now so authorities are not racing to find a solution if the drug shortage drags on.

Opponents of the measure say firing squads are barbaric, with the American Civil Liberties Union of Utah saying the bill makes the state "look backward and backwoods."

Utah lawmakers stopped offering inmates the choice of firing squad in 2004, saying the method attracted intense media interest and took attention away from victims.

Utah is the only state in the past 40 years to carry out such a death sentence, with three executions by firing squad since the U.S. Supreme Court reinstated the death penalty in 1976.

The last was in 2010, when Ronnie Lee Gardner was put to death by five police officers with .30-caliber Winchester rifles in an event that generated international interest and elicited condemnation from many.

Gardner killed a bartender and later shot a lawyer to death and wounded a bailiff during a 1985 courthouse escape attempt.

The bailiff's widow, VelDean Kirk, said she supports Utah's efforts to bring back the firing squad.

Gardner's brother recently has spoken out against it. Randy Gardner said he doesn't condone his brother's actions but believes the firing squad is barbaric.