HUNTSVILLE, Texas — A Texas inmate was executed by lethal injection Wednesday evening for killing a supervisor at a state prison shoe factory in Amarillo nearly 17 years ago.

Travis Runnels, 46, was convicted of slashing the throat of 38-year-old Stanley Wiley on Jan. 29, 2003. Runnels was executed at the state penitentiary in Huntsville.

Prosecutors say Runnels killed Wiley at the Texas Department of Criminal Justice Clements Unit in Amarillo because he didn’t like working as a janitor at the shoe factory. They said Runnels had wanted to transfer to a job at the prison barbershop and was angry at Wiley because that hadn’t happened.

Runnels, belted to the death chamber gurney, responded “No” when the warden asked if he had a final statement. As the lethal dose of the powerful sedative pentobarbital began, he smiled and mouthed words and a kiss toward three female friends and two of his attorneys who watched through a window a few feet from him. Then he blurted out “Woof, woof!” just before taking four quick breaths and snoring four times before all movement stopped.

Runnels was pronounced dead at 7:26 p.m. CST, 22 minutes after the drug began flowing into his arms, making him the 22nd inmate put to death this year in the US and the ninth in Texas.

He never looked at the sister and brother-in-law of his victim, who watched through a window in an adjacent witness room.

Outside the Huntsville Unit prison, several hundred Texas corrections officers stood in formation, and Wiley’s sister, Margaret Robertson, hugged or shook the hands of many of them as she and her husband left the prison.

Runnels had been serving a 70-year sentence for an aggravated robbery conviction from Dallas when he killed Wiley with a knife used to trim shoes. The factory makes shoes for inmates in the state prison system.

The execution was delayed about an hour until the US Supreme Court turned down an appeal by Runnels’ attorneys, who said a prosecution witness at his 2005 trial provided false testimony and that no defense was presented because his lawyers advised him to plead guilty and called no witnesses.

Janet Gilger-VanderZanden, one of his more recent attorneys, said Runnels changed during his 14 years on death row.

“There is true and authentic remorse for the death of Mr. Wiley. There are no excuses, rather there is a commitment to finding some kind of light in what was once a world of only darkness,” Gilger-VanderZanden said.

Lower courts and the Texas Board of Pardons and Paroles had also turned down Runnels’ attorneys’ requests to stop his execution.

Four inmates who were convicted in the deaths of state correctional officers or other prison employees have been put to death since 1974, while three others remain on death row, according to the Texas Department of Criminal Justice.

At the factory, Runnels approached Wiley from behind, pulled his head back and used enough force for the knife to go through his trachea and cut Wiley’s spinal cord.

“It was cowardly,” prosecutor Randall Sims told jurors at Runnels’ trial.

Wiley, who grew up in the Texas Panhandle city of Amarillo, began working as a state corrections officer in 1994. He was later promoted to a supervisory position.

Inmate Bud Williams Jr., who also worked at the shoe factory, testified that Wiley “was a good guy.”

At his trial, Runnels’ lawyers didn’t present any witnesses or evidence, including information about Runnels’ troubled childhood and family history of drug and alcohol abuse, Gilger-VanderZanden said.

In their petition to the Supreme Court, Runnels’ attorneys argued that his death sentence was mainly due to the testimony of prison expert A.P. Merillat, who told jurors that inmates like Runnels could not be held in a secure environment if sentenced to life in prison without parole.

The Texas Court of Criminal Appeals overturned the death sentences of two inmates, in 2010 and 2012, after ruling that Merillat gave jurors incorrect information.

The Texas Attorney General’s Office pointed to assaults by Runnels on other guards after Wiley’s death, including throwing feces and a light bulb at them, as evidence that he was a future danger and merited a death sentence.

In his clemency petition to the Texas Board of Pardons and Paroles, Runnels included letters from more than 25 individuals from around the world who said Runnels had worked to make amends for what he did.

“He has become a light that shines bright even in the darkest of spaces. The tragedy that he is responsible for will only be compounded if his valuable light were to be extinguished,” Kristin Procanick, from Syracuse, New York, wrote in one of the letters.