Image copyright Oklahoma Dept of Corrections Image caption Executions using lethal injection have been surrounded by controversy

Oklahoma plans to use nitrogen gas as its preferred method of execution when it resumes using the death penalty, the first US state to do so.

The announcement was made by State Attorney General Mike Hunter and Corrections Director Joe Allbaugh.

Capital punishment has been on hold in Oklahoma for three years amid problems with the lethal injection method.

Mr Hunter told a news conference on Wednesday that nitrogen was easy to obtain and led to a painless death.

Authorities will work together over the coming months to develop new protocols, the two men added. It is not clear exactly how soon executions will resume.

Oklahoma passed a bill in 2015 to allow nitrogen gas poisoning, or nitrogen-induced hypoxia, as a method of execution following difficulties in obtaining the drugs necessary for lethal injection. Some drug companies have forbidden the use of their products in executions.

An indefinite stay on capital punishment in the state was announced in October 2015 after prison officials nearly gave the wrong lethal injection drug to death row inmate Richard Glossip.

Oklahoma had already overhauled how it carried out the death penalty after the botched execution of Clayton Lockett in 2014. Lockett struggled and took more than 40 minutes to die.

Seventeen inmates on death row in Oklahoma are in line for execution after losing appeals, the local NewsOK website reported.

More on the US death penalty

Alabama inmate 'heaved' during execution

Inmate dies in 'botched' execution

US death sentences fall to 40-year low

Crowdfunding to witness son's execution