SALT LAKE CITY — Utah has passed a bill that would make it the only state to allow firing squads for carrying out a death penalty if there is a shortage of execution drugs. The 18-10 vote by the state Senate on Tuesday comes as states struggle to obtain lethal injection drugs amid a nationwide shortage.

The bill’s sponsor, Republican Rep. Paul Ray of Clearfield, touted the measure as being a more humane form of execution. Ray argued that a team of trained marksmen is faster and more humane than the drawn-out deaths that have occurred in botched lethal injections.

Opponents disagree, saying firing squads are a cruel holdover from the state’s wild West days and will earn the state international condemnation.

Whether it will become law in the conservative Western state is unclear: Utah Gov. Gary Herbert, a Republican, won’t say if he’ll sign the measure. His spokesman, Marty Carpenter, did issue a statement this week acknowledging that the method would give Utah a legitimate backup method if execution drugs are unavailable. It would reinstate the use of firing squads more than a decade after the state abandoned the practice.

Utah is one of several states to seek out new forms of capital punishment after a botched Oklahoma lethal injection last year and one in Arizona that took nearly two hours.

Legislation to allow firing squads has been introduced in Arkansas this year. In Wyoming, a measure to allow firing squads if the lethal drugs aren’t available died. In Oklahoma, lawmakers are considering the use nitrogen gas to execute inmates.

Utah’s proposal keeps lethal injection as the primary method of execution, but it allows for the state to use firing squads if the state cannot obtain lethal injection drugs.

States across the country have struggled to keep up their drug inventories as European manufacturers have refused to sell the lethal concoctions to prisons and corrections departments because of their opposition to the death penalty.