Death row inmates in Idaho could be executed by firing squad if no lethal injection is available, according to a bill passed by the legislature of the western US state.

The bill, approved by the Senate of the conservative state by 24 votes in favor to 11 against, must now be signed into law by the governor.

Idaho would then become the fifth US state to approve execution by firing squad, after Utah, Oklahoma, Mississippi, and South Carolina, according to the Death Penalty Information Centre.

Since 1976 and the end of a brief moratorium on the death penalty in the United States, two men and a woman have been executed in this way - all in Utah, also in the west.

The last one was 2010.

The Idaho Capitol building in Boise, where the bill was approved by 24 votes to 11

The US states which have the death penalty have been experiencing great difficulty in obtaining the chemical components necessary for a lethal injection, due to opposition by pharmaceutical companies which do not want to be associated with executions.

Death by firing squad would occur in Idaho only if a lethal injection were not possible.

The American Civil Liberties Union denounced the passage of the law as "appalling", calling the legislation "archaic".

"A firing squad is particularly gruesome...such executions leave lasting scars on all those involved," ACLU Idaho said in a statement.

Those killed by firing squad "likely experience extreme levels of pain and torture", added the organisation, citing experts.