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

ATMORE, Ala. — A convicted cop killer who sued Alabama over its lethal injection method was put to death, but not before he cursed at the state and said: "I hate you."

As the procedure began Thursday night, Torrey Twane McNabb, 40, raised both of his middle fingers in a show of defiance. McNabb's attorneys had unsuccessfully sought to stop the execution since he was one of several inmates in an ongoing lawsuit challenging the humaneness of the state's lethal injection procedure.

McNabb was convicted of killing Montgomery police officer Anderson Gordon in 1997. He shot Gordon five times as the officer sat in his patrol car after arriving at a traffic accident McNabb caused while fleeing a bail bondsman, prosecutors said.

Torrey Twane McNabb. AP

Gordon's relatives said in a statement that the 30-year-old officer — known as "Brother" — was devoted to his family, his two children and his work as a police officer.

The Morning Rundown Get a head start on the morning's top stories. This site is protected by recaptcha

"Over 20 years ago, we lost a companion, a father, a brother and friend who only wanted to make a difference in his community," the statement read. "Although, the wounds of having a family member murdered can never be healed, through this tragedy, the Gordon family has remained strong and will continue to be resilient."

Related: Texas Calls Off Execution to Probe 'Collusion' Between Inmates

The inmates in the lawsuit have argued that the sedative midazolam does not reliably render a person unconscious before subsequent drugs stop their lungs and heart. They point to an execution last December during which an Alabama inmate coughed and heaved for the first 13 minutes of the procedure.

McNabb appeared to be breathing for the first 20 minutes of the 35-minute long procedure. He later appeared to move his head, grimace and raise his arms after two consciousness checks in which a guard pinches his arm, says his name and pulls back his eyelid — before eventually becoming still.

His family members and attorneys who witnessed the execution expressed repeated concerns to each other that he was still conscious during the lethal injection. "He's going to wake up," one of McNabb's family members whispered.

Related: Will Racial Slur Derail Execution of Georgia Inmate?

He was pronounced dead at 9:38 p.m. CDT, authorities said.

Alabama Commissioner Jeff Dunn said he was confident the movements after the second consciousness check were involuntary and that McNabb was not awake.

A lawyer for McNabb argued that it would be wrong to carry out the execution while proceedings continue in McNabb's lawsuit.

The state argued that the inmates are unlikely to prevail in their claims since the U.S. Supreme Court has allowed other executions, including four in Alabama, to proceed using midazolam. The attorney general's office argued McNabb had presented nothing new to justify a stay.

The U.S. Supreme Court delayed the execution for more than two hours to consider McNabb's request for a stay, but ruled that the execution could go forward.