A US federal judge has scheduled a hearing to discuss what happened during an aborted lethal injection in Alabama where lawyers said the inmate endured two-and-a-half hours of medical staff trying to access his veins before the state halted the execution.

District Judge Karon Bowdre also ordered the state to preserve all evidence related to the attempted execution and for the inmate, Doyle Lee Hamm, to have a medical evaluation over the weekend.

Hamm’s lawyer had requested the emergency hearing to get more information.

Prison officials announced at about 11.30pm on Thursday that they were halting the execution because medical staff did not think they could obtain “the appropriate venous access” before a midnight deadline to get the execution under way.

The announcement came about two-and-a-half hours after the US Supreme Court gave the green light for the execution to proceed.

Bernard Harcourt, who is representing Hamm, said he had argued in court filings that lethal injection would be difficult and painful because Hamm’s veins have been severely compromised by lymphoma, hepatitis and prior drug use.

“He’s in great pain from yesterday evening, physically, from all of the attempts to access his veins in his lower extremities and in his groin,” Harcourt told The Associated Press.

Corrections Commissioner Jeff Dunn disputed characterisations that there was a problem with the execution.

“It was a time issue,” he said. “I wouldn’t necessarily characterise what we had tonight as a problem… The only indication I have is that in their medical judgment it was more of a time issue given the late hour.”

Mr Dunn said he did not know how long the medical team attempted to connect the line.

A medical review ordered by Judge Bowdre found that the veins in Hamm’s upper body would require a doctor and guided ultrasound, but that he has usable veins in his lower body.

The Alabama attorney general’s office had assured the courts in earlier court filings, as Hamm attempted to block his execution, that it could conduct the execution by connecting the intravenous line to usable veins in Hamm’s lower leg.

Hamm was convicted in the 1987 killing of motel clerk Patrick Cunningham.

Mr Cunningham was shot once in the head while working an overnight shift at a Cullman motel. Police said 410 dollars was taken during the robbery.

Hamm gave police a confession and he was convicted after two accomplices testified against him in exchange for being allowed to plead guilty to lesser offences, according to court documents.

AP