Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

An Alabama death-row inmate who survived a botched lethal injection will not face another date with death under a settlement his attorney struck with the state.

Alabama death-row inmate Doyle Lee Hamm Alabama Department of Corrections via AP

Doyle Lee Hamm filed a civil rights action last month after the prison medical team repeatedly punctured him in an effort to place an IV before calling off the execution just before his death warrant expired.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

His attorney, Columbia law professor Bernard Harcourt, had said the procedure amounted to "torture" and was so painful that the 61-year-old Hamm hoped for a quick death.

"During this time Mr. Hamm began to hope that the doctor would succeed in obtaining IV access so that Mr. Hamm could 'get it over with' because he preferred to die rather than to continue to experience the ongoing severe pain," Dr. Mark Heath, who was retained by Harcourt to examine Hamm, wrote in a report after examining the inmate.

Hamm was sentenced to death for the 1987 murder of hotel clerk Patrick Cunningham.

His legal team warned the state that his veins were in such bad shape from drug use and cancer treatment that it would be very challenging, if not impossible to place the needle that would deliver the lethal drugs.

Alabama's lethal injection chamber at Holman Correctional Facility. Dave Martin / AP file

After that prediction proved true, Harcourt and the state began confidential negotiations. The result is that the state won't set another execution date and Hamm will drop his legal challenges.

Alabama now avoids the possibility of a gory replay of the Feb. 22 attempt and Doyle never has to return to the death chamber.

"Doyle, his family and his legal team are extremely relieved," Harcourt said.