A condemned killer who had given up on any further appeals as he awaited execution in Nevada on Wednesday received an 11th-hour reprieve after a pharmaceutical company sued to block the use of one of its drugs in the lethal injection process.

Alvogen, which said the Nevada Corrections Department had obtained the sedative midazolam unlawfully, won a court order barring the product from being administered to Scott Dozier as part of the state's newly devised and untested three-drug execution protocol.

Another judge formally issued an indefinite stay of the execution.

The 47-year-old inmate had been scheduled to be put to death at 8 p.m. (0300 GMT on Thursday) at a state prison in Ely, Nevada, about 245 miles (395 km) north of Las Vegas, in what would have been the state's first execution in 12 years.

But the ruling by Clark County District Judge Elizabeth Gonzalez, and the stay that followed from Judge Jennifer Togliatti, left uncertain when his execution could proceed.

Gonzalez set a status check on the case for Sept. 10, court spokeswoman Mary Ann Price said. Corrections spokeswoman Brooke Santina said the execution would remain effectively postponed for at least that long.

The privately held U.S.-based drugmaker filed a lawsuit on Tuesday, asserting that use of its product for an execution would cause "irreparable injury to Alvogen, its reputation, and its goodwill." A copy of the complaint was posted online by the Nevada Independent news organization.

Nevada corrections officials revised their lethal injection protocol last week, saying they were switching to midazolam to replace expired prison supplies of another sedative, diazepam.

Midazolam, which the World Health Organization counts on its list of essential medicines, has nevertheless been implicated in a number of botched executions in other states.

The sedative is intended to render the inmate unconscious before the person is given the synthetic opioid fentanyl and then the paralytic agent cisatracurium.