The execution was scheduled for convicted murderer and cancer survivor Doyle Lee Hamm, who killed motel clerk Patrick Cunningham in 1987

An execution team in Alabama left a death-row inmate with more than a dozen puncture wounds in his legs and groin in a failed lethal injection attempt late Thursday night.

The execution was scheduled for convicted murderer and cancer survivor Doyle Lee Hamm, who killed motel clerk Patrick Cunningham in 1987. Hamm has been on death row since December 1987 when he was convicted of Cunningham's murder.

The victim, an employee of Anderson's Motel in Cullman, was shot in the head during a robbery that apparently netted about $410.

Hamm's execution started late on Thursday after several last-minute appeals failed, according to NBC News. But after several minutes of attempts it had to be aborted because the team could not find a viable vein to administer the injection.

The effort resulted in what Hamm's attorney Bernard Harcourt classified as torture, explaining that the inmate was left with more than 12 puncture marks in his legs and groin, some of which may have penetrated his bladder or femoral artery.

When the execution eventually started it resulted in what Hamm's attorney Bernard Harcourt classified as 'torture'

Harcourt said Hamm was left with more than 12 puncture marks in his legs and groin, some of which may have penetrated his bladder or femoral artery

'This was clearly a botched execution that can only accurately be described as torture,' Harcourt said in a statement after a doctor examined his client.

After the execution was postponed for several hours on Thursday, Harcourt convinced a federal judge to allow him to pick a doctor to examine Hamm.

While Hamm was strapped into the gurney and preparing to be administered the lethal injection, the IV team 'simultaneously worked on both legs at the same time, probing his flesh and inserting needles.'

Harcourt claims the IV punctured Hamm's bladder because he was urinating blood on Friday.

'They may have hit his femoral artery as well,' he continued.

'Because suddenly there was a lot of blood gushing out. There were multiple puncture wounds on the ankles, calf, and right groin area, around a dozen.'

He said that throughout the botched attempt his client was 'laying there praying and hoping that they would succeed because of the pain.' He said Hamm collapsed when they finally gave up and took him off of the gurney.

Hamm has been on death row since December 1987 when he was convicted of Cunningham's murder. Picutred left is Hamm just after he was arrested, and pictured right is the victim Patrick Cunningham in 1987

Hamm now has several puncture marks as well as bruising and swelling in his groin and pain from his abdomen to his upper thigh, Harcourt said. On Sunday he was still unable to walk without limping from the pain.

Prisoners have a constitutional protection against cruel and unusual punishment, and courts can decide if certain execution techniques violate that right.

Hamm’s lawyer previously said the inmate has been battling cranial and lymphatic cancer for over three years. Treatment has compromised his veins, and lethal injection would likely cause 'cruel and needless pain,' according to papers filed last December by Harcourt, who has represented Hamm since 1990.

The Alabama Attorney General's Office argued Hamm's cancer is in remission, and a judge ruled it could proceed if the IV wasn't inserted into Hamm's arms. The US Supreme court then declined to stop the lethal injection, with three of the judges consenting.

Attorney General Steve Marshall argued that the circumstances of the crime and consequences to the victim and victim's family was too 'heinous' to allow a stay. In a statement posted to his Facebook, Marshall said that going on with the execution would be 'serving justice.'

Prison officials have not given many details about what happened in the death chamber before he was given a reprieve.

Corrections commissioner Jeff Dunn said at the time that it was 'more of a time issue' that postponed Thursday night's execution.

The judge has now ordered the Department of Corrections to preserve any notes or other material from the first execution try - including the clothing Hamm was wearing.

It is not clear when the lethal injection will be rescheduled for.

This botched execution is the latest in a string which have gained controversy for the type of drugs used and the effect they had on the subject.

Clayton Lockett spent 40 minutes writhing in agony before dying of a heart attack after he was given a lethal injection in 2014.

It was the first time Oklahoma used the drug midazolam as the first element in its execution drug combination.

The following year convicted rapist and murderer Charles Warner was given the wrong drug during his execution in the state.

Oklahoma used potassium acetate - not potassium chloride, as required under state protocol - and Warner said his body felt like it was 'on fire'.

Texas was the first US state to use lethal injection in 1982, while Ohio was the first to use the one-drug method in 2009.

Until then, most states used a three-drug combination for lethal injections: an anesthetic, a paralytic and a drug to stop the heart.