MONTGOMERY, Ala. -- Alabama on Thursday halted the execution of an inmate who had argued his veins were too damaged for lethal injection, because medical staff did not think they could connect the intravenous line by the time the death warrant expired at midnight.

Alabama Corrections Commissioner Jeff Dunn said the prison system halted Doyle Lee Hamm's execution around 11:30 p.m. "out of an abundance of caution" after medical staff said they did not think they could obtain "the appropriate venous access" before midnight.

"It was a time issue," Dunn said. "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."

Get Breaking News Delivered to Your Inbox

Bernard Harcourt, a law school professor representing Hamm, said the state should be "ashamed."

"This is exactly what I have been saying since July. Since July, I have been telling the state of Alabama that Doyle Lee Hamm does not have adequate veins for a lethal injection," Harcourt said.

The U.S. Supreme Court ruled at 9 p.m. Thursday that Hamm's execution could proceed. Dunn said he was informed after 11 p.m. about concerns that the preparations could not be completed by midnight. Dunn said he didn't know how long the medical team attempted to connect the line.

Hamm was scheduled to be executed for the 1987 slaying of a motel clerk.

He was diagnosed with B-cell lymphoma in 2014. Harcourt said there was evidence the blood cancer had progressed, while the state contended he was in remission.

State prison officials told courts last week that they intended to connect the line below Hamm's knee after a medical review ordered by a federal judge found that he had no easily usable veins in his upper extremities. The state in court filings had expressed confidence that Hamm had usable veins.

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.

Harcourt argued that the inmate's veins had been severely compromised from cancer, hepatitis C and former drug use and that it would be difficult to administer the drugs by lethal injection. Harcourt wrote in court filings that Hamm's health problems increased the "chances of a botched, painful, and bloody execution" that would be unconstitutionally cruel.

The U.S. Supreme Court ruled about 9 p.m. that the execution could proceed, after delaying it for three hours to consider the final appeals. Justices Ruth Bader Ginsburg and Sonia Sotomayor dissented from the decision. Justice Stephen Breyer wrote that he would reconsider the constitutionality of the death penalty itself.

The state of Hamm's health, and veins, were the subject of court filings as his attorney sought to stop the execution and the state argued it should be carried out.

Harcourt wrote in a filing to the 11th U.S. Circuit Court of Appeals that the state previously denied Hamm had venous access problems and the "rush to settle on this creative and novel protocol - simply as a means to execute Doyle Hamm as quickly and cheaply as possible - shows a deliberate indifference to his well-being that violates the Eighth Amendment prohibition on cruel and unusual punishment."

The Alabama attorney general's office argued that the execution should proceed. State lawyers said Hamm's lymphoma has been in remission since 2016 and dismissed his claims of elevated pain risk as "hyperbole."

"It has been more than thirty years since Hamm committed his capital murder. Hamm's conviction is valid and a competent state court with jurisdiction over his case set his execution date according to Alabama law," state lawyers wrote.