Torrey McNabb was executed amid a lawsuit in relation to the drug Midazolam
A killer who was pursuing a lawsuit against Alabama's use of the lethal injection has been executed - using his final moments to tell the state "I hate you" and give them the middle finger.
As the procedure began on Thursday night, Torrey McNabb raised both of his middle fingers in a show of defiance.
The 40-year-old was among several inmates involved in an ongoing lawsuit arguing the state's use of midazolam during lethal injections is inhumane and not reliable.
He was convicted of killing Anderson Gordon, an officer with Montgomery Police, in 1997.
A witness had testified that McNabb walked up to Gordon's patrol car and shot him five times.
The officer had just arrived at the scene of a traffic accident caused by McNabb as he tried to escape from a bail bondsman.
Midazolam is administered to sedate the prisoner, before a second drug paralyses them and a final third drug stops their heart.
During an execution in December, an Alabama inmate had coughed and heaved for 13 minutes before dying.
McNabb appeared to be breathing for the first 20 minutes of the 35-minute execution.
He later moved his head, raised his arms and grimaced after two consciousness checks in which a guard pinched his arm, said his name and pulled back his eyelid.
One of his relatives said "he's going to wake up" before McNabb eventually became still.
Alabama Commissioner Jeff Dunn said McNabb's movements after the second consciousness check were involuntary and that he was not awake.
The state said the lawsuit is unlikely to be successful since the US Supreme Court allowed other executions, in Alabama and other states, to go ahead using midazolam.
In April, Arkansas executed four inmates in eight days in a bid to use up its supply of midazolam before it expired.
It had planned to execute eight prisoners over 11 days, but courts issued stays for the other four inmates.