MONTGOMERY, Ala. -- Execution team members stuck an inmate repeatedly in the lower legs, ankles and groin in effort to find a usable vein before the state called off the lethal injection, according to a Friday court filing by the inmate's lawyer. Prison offiicals said at 11:30 p.m. that they halting the execution because medical staff did not think they could obtain "the appropriate venous access" before a midnight deadline.

Doyle Lee Hamm, who has battled lymphoma, was to be executed Thursday for the 1987 slaying of motel clerk Patrick Cunningham. The announcement came about 2 ½ hours after the U.S. Supreme Court cleared the execution to proceed.

Attorney Bernard Harcourt said he is seeking more information about what happened during the attempted execution of his client, the 61-year-old Hamm, on Thursday night. U.S. District Judge Karon Bowdre on Friday ordered a medical examination of Hamm and directed the state to maintain material related to the attempt.

Get Breaking News Delivered to Your Inbox

The state prison commissioner said the execution was delayed because of a "time issue."

"I wouldn't necessarily characterize 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," Commissioner Jeff Dunn said early Friday.

Harcourt said the execution was botched and that he had argued in court filings since July that lethal injection would be difficult and painful because Hamm's veins have been severely compromised by lymphoma, hepatitis and prior drug use.

Two execution team members, working on each side of Hamm's body, tried multiple times to insert the intravenous line on his left and right legs and ankles, and later turned him over and slapped the back of his legs to try to get a vein, Harcourt said. They then tried unsuccessfully to connect the line through his groin, he said.

"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.

Early Friday, shortly after officials announced that the execution had been halted, Corrections Commissioner Jeff Dunn said the only obstacle to a successful execution was that the team lacked sufficient time. Dunn said he didn't know how long the medical team attempted to connect the line. The Alabama attorney general's office didn't respond to a request for comment.

Harcourt asked Bowdre to let the physician who conducted Hamm's medical exam to review the notes state officials took during the attempted execution.

He argued that the lapse of more than two hours before the state halted the execution was a sign that something was wrong. The past four executions in the state began about an hour after final permission was given from the U.S. Supreme Court.

Records from Georgia show that it typically takes that state less than 20 minutes to prepare an inmate for lethal injection, although there have been exceptions. In 2016, it took more than an hour to prepare a 72-year-old inmate when staff were unable to insert an IV in one arm and ended up connecting to a vein in his groin.

Alabama carries out executions by lethal injection unless an inmate requests the electric chair.

Hamm was convicted in the 1987 killing of motel clerk Patrick Cunningham. Cunningham was shot once in the head while working an overnight shift at a Cullman motel. Police said $410 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 offenses, according to court documents.

Executions were also scheduled to take place Thursday in Texas and Florida.

In Florida, Eric Scott Branch , 47, was pronounced dead at 7:05 p.m. Thursday after a lethal injection at Florida State Prison. Branch was convicted of the rape and fatal beating of University of West Florida student Susan Morris, 21.

In Texas, Gov. Greg Abbott accepted the recommendation of the state's parole board and granted clemency for Thomas "Bart" Whitake , on death row for masterminding the fatal shootings of his mother and brother at their suburban Houston home in 2003.