Oklahoma's attorney general has agreed to a six-month stay of execution for a death row inmate whose capital punishment had been temporarily suspended because of a botched execution in April that was widely criticized as cruel and inhumane, according to Associated Press.

The attorney general said it would not object to the stay for Charles Warner, who raped and murdered an 11-month-old baby, as it looks into what went wrong with the previous execution, the AP reported.

Warner had been scheduled to be put to death two hours after the April 29 execution of convicted murderer Clayton Lockett, but Lockett's execution was halted during the procedure due to problems with the lethal injection that left him squirming and mumbling on a death chamber gurney, according to the AP.

Lockett died of an apparent massive heart attack 43 minutes after the start of the lethal injection process, the AP reported.

A prison report said the problems were largely due to a collapsed vein during the injection and that the needle was inserted in Lockett's groin instead of his arm, which was injured after prison officials used a stun gun to restrain him, according to the AP.

"We are very pleased that the AG agrees at least six months is necessary before any execution in Oklahoma can take place, given the need for a full investigation to be conducted into Clayton Lockett's agonizing botched execution," said attorney Madeline Cohen, part of team seeking the stay, the AP reported.

Separately, in neighboring Texas, attorneys for death row inmate Robert James Campbell, this week filed papers seeking a stay of his scheduled May 13 execution, citing the problems with Lockett's execution, according to the AP.

Oklahoma and other states have been scrambling to find new suppliers and chemical combinations after drug makers, mostly in Europe, imposed sales bans because they objected to having medications made for other purposes being used in lethal injections, the AP reported.

Attorneys for death row inmates have argued that the drugs could cause unnecessarily painful deaths, which would violate the U.S. Constitution's prohibitions against cruel and unusual punishment, according to the AP.