SALT LAKE CITY — Utah became the only state to allow firing squads for executions when Gov. Gary Herbert signed a law approving the method for use when no lethal injection drugs are available, even though he has called it “a little bit gruesome.”

The Republican governor has said 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, enforcing death sentences is “the obligation of the executive branch.”

The governor’s office noted that other states allow execution methods other than lethal injection. In Washington state, inmates can request hanging. In New Hampshire, hangings are fallback if lethal injections can’t be given. And an Oklahoma law would allow the state to use firing squads if lethal injections and electrocutions are ever declared unconstitutional.

Utah’s new approval of firing squads carries no such legal caveat and represents the latest example of frustration over botched executions and the difficulty of obtaining lethal injection drugs as manufacturers opposed to capital punishment have made them off-limits to prisons.

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

Ray said he wants to settle on a backup method now so authorities are not racing to find a solution if the drug shortage persists. Ray didn’t return messages seeking comment Monday.

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

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 rifles in an event that generated international interest and elicited condemnation.

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, who witnessed Gardner’s execution, said she supports the new law. “I don’t think it’s barbaric,” she said. “I think that’s the best way to do it.”

Gardner’s brother has spoken out against the method. Randy Gardner of Salt Lake City said he doesn’t condone his brother’s actions, but he opposes the death penalty and said firing squads make the state look bad.

“My God, we’re the only ones that are shooting people in the heart,” he said.

One person nearing a possible execution date is Ron Lafferty, who claimed God directed him to kill his sister-in-law and her baby daughter in 1984 because of the victim’s resistance to his beliefs in polygamy.

Lafferty has already requested the firing squad – an option available to him because he, like Gardner, was convicted prior to 2004.

The other Utah death row inmate who could be next up for execution, Doug Carter, has chosen lethal injection. Under this new law, Carter would get the firing squad if the state can’t get lethal injection drugs 30 days before.