The measure, which passed 18 to 10, will be sent to Gov. Gary Herbert, who has not said whether he will sign it into law or veto the bill.
Herbert released a statement on the legislation, which would add death by firing squad as an option in a state that uses lethal injection.
"Our statute is clear that lethal injection is the method by which (an execution) will happen. We have no intent to change that," he said.
The law would give the state the option to use a five-member squad in cases where the drugs necessary for lethal injection aren't available 30 days before the date set for the execution.
"Our state, as is the case with states around the country, is finding it increasingly difficult to obtain the substances required to perform a lethal injection. We are dedicated to pursuing all reasonable and legal options to obtain those substances to make sure that, when required, we are in a position to carry out this very serious sentence by lethal injection," the governor said.
Eight people are on Utah's death row.
Utah banned death by firing squad in 2004, though inmates who chose that option before the law changed still ended up being shot to death.
The last execution by firing squad was in 2010, and it was also the most recent execution in Utah.
A Utah firing squad also executed Gary Gilmore in 1977, the first death by capital punishment after the U.S. Supreme Court reinstated the death penalty the prior year.
In recent years, states have struggled to maintain a supply of lethal injection drugs as manufacturers either stopped producing the drugs or barred their use in executions.
The European manufacturers of pentobarbital, an anesthetic, explicitly banned U.S. prisons from using its drug in executions.
Some states have sought out substitutes or gone with one drug instead of the traditional three-drug cocktail.
In April, Oklahoma used midazolam as a substitute for pentobarbital as part of a three-drug cocktail in an execution that went awry.
Clayton Lockett, a convicted rapist and murderer, writhed and convulsed after the drugs were administered. It took 43 minutes for him to die.
Last week, Georgia postponed an execution because the drugs appeared "cloudy." The state also indefinitely postponed at least one other execution until it can analyze the cocktail it uses for the procedures, officials said.