A death row inmate who survived a botched two-hour execution has died after a cancer battle.

Doyle Hamm, 64, was originally scheduled to be executed on February 22, 2018, but the IV team could not find a vein after hours of trying so it never went through.

Later that year, the state of Alabama decided that another execution date wouldn’t be set for Hamm, effectively giving him a life sentence.

Hamm was sentenced to death in 1987 for the murder of Patrick Cunningham, a nighttime clerk at the Anderson Motel in Cullman, Alabama.

Since 2014, Hamm had been battling “an extremely aggressive lymphoma” according to his lawyer, Bernard Harcourt, who said that complications of the disease contributed to his client’s death.

It’s possible that Hamm’s veins were too hard to access during his execution due to years of intravenous drug use and his cancer.

“The result was an agonizing, torturous botched execution that left him on the gurney for two-and-a-half hours as they picked and prodded at his legs and groin, trying to find a vein,” said Harcourt.

“It was unconscionable.”

Hamm was sentenced to death in 1987 for the murder of Patrick Cunningham

Harcourt said the execution left Hamm with bruises and swelling on his body and was “praying and hoping” that the execution would succeed because of the pain he endured.

Following the failed execution, Hamm and the state of Alabama reached a confidential settlement to not give Hamm another execution date.

“This is a great relief to Doyle Hamm,” Harcourt said at the time.

“It comes after lengthy, fruitful discussions with the Alabama Attorney General’s office.”

Harcourt, who represented Hamm pro bono for all these years, said he will miss Hamm’s “generous, giving spirit and positive attitude” even after surviving his unprecedented execution.

Hamm is survived by his daughter and brother.