McALESTER, Okla. (AP) — An Oklahoma inmate whose execution was halted Tuesday because the delivery of a new drug combination was botched died of a heart attack, the state Department of Corrections said.

This photo combo of images provided by the Oklahoma Department of Corrections shows Clayton Lockett, left, and Charles Warner. Lockett and Warner, two death-row inmates who want to know the source of drugs that will be used to execute them, have placed Oklahoma’s two highest courts at odds and prompted aggravated members of the Legislature to call for the impeachment of Oklahoma Supreme Court justices. (AP Photo/Oklahoma Department of Corrections)

Director Robert Patton said inmate Clayton Lockett died Tuesday after all three drugs were administered.

Patton halted Lockett’s execution about 20 minutes after the first drug was administered. He said there was a vein failure.

Lockett was writhing on the gurney and shaking uncontrollably.

The planned execution later Tuesday of a second inmate was postponed.

The executions of Lockett and Charles Warner previously had been delayed after they challenged the secrecy behind the state’s lethal injection protocol. Lockett received a new lethal injection formula that included the sedative midazolam as the first in a three-drug combination.

A four-time felon, Lockett, 38, was convicted of shooting 19-year-old Stephanie Neiman with a sawed-off shotgun and watching as two accomplices buried her alive in rural Kay County in 1999 after Neiman and a friend arrived at a home the men were robbing.

Warner had been scheduled to be put to death two hours later in the same room and on the same gurney. The 46-year-old was convicted of raping and killing his roommate’s 11-month-old daughter in 1997. He has maintained his innocence.

Lockett and Warner had sued the state for refusing to disclose details about the execution drugs, including where Oklahoma obtained them.

The case, filed as a civil matter, placed Oklahoma’s two highest courts at odds and prompted calls for the impeachment of state Supreme Court justices after the court last week issued a rare stay of execution. The high court later dissolved its stay and dismissed the inmates’ claim that they were entitled to know the source of the drugs.

By then, Gov. Mary Fallin had weighed into the matter by issuing a stay of execution of her own – a one-week delay in Lockett’s execution that resulted in both men being scheduled to die on the same day.