MONTGOMERY, Ala. — Alabama will become the third state to authorize the untested use of nitrogen gas to execute prisoners, under legislation signed into law Thursday by Gov. Kay Ivey.

As lethal injection drugs become difficult to obtain, states have begun looking at alternative ideas for carrying out death sentences. While lethal injection would remain the state’s primary execution method, the new law would allow the state to asphyxiate condemned inmates with nitrogen gas if lethal injection drugs are unavailable or lethal injection is ruled unconstitutional.

Lawmakers who supported the change suggested that it would be more humane.

“It provides another option. I believe it is more humane option,” said Sen. Trip Pittman, a south Alabama Republican who sponsored the bill. Pittman likened the procedure to the way aircraft passengers pass out when a plane depressurizes.

The state would have to develop procedures for the new execution method. Pittman said that it might involve “some type of mask” over the inmate’s face that gradually replaces oxygen with nitrogen.

“The process is completely experimental,” said Robert Dunham, executive director of the Death Penalty Information Center — a group that compiles death penalty statistics.

The center says no state has carried out an execution by nitrogen gas. Two other states — Oklahoma and Mississippi — have voted to authorize execution by nitrogen gas as a backup method of execution, according to the center.

Oklahoma announced last week that it will begin using nitrogen for executions, when the state resumes death sentences, because of difficulty obtaining lethal injection drugs.

However, neither Oklahoma nor Alabama will likely carry out executions with nitrogen in the immediate future, Dunham said. Before implementation, the states will have to develop protocols and get them approved by the courts amid almost certain legal challenges.

States face an increasing dilemma if they want to carry put executions, Dunham said. With pharmaceutical companies becoming hesitant to sell drugs for use in executions, states must look for alternate channels to obtain them or alternate methods of execution.

Utah authorized execution by firing squad. Tennessee has said the electric chair will be used when lethal injection drugs are unavailable.

Alabama previously carried out death sentences with an electric chair nicknamed “Yellow Mama” because it was painted with yellow highway striping paint. While inmates can still choose the electric chair, Alabama made lethal injection the primary method amid concerns that electrocution might one day be ruled unconstitutional and beliefs that lethal injection would be more humane.

Opponents of the Alabama legislation questioned how lawmakers could assert nitrogen would be painless since the method hasn’t been tried.

“We had Yellow Mama. Now, we are going to bring back the gas chamber,” Rep. Thomas Jackson, a Democrat from Thomasville, said during debate Tuesday.