An avowed racist who orchestrated one of the most gruesome hate crimes in US history was executed in Texas for the dragging death of a black man.

John William King, who was white, received lethal injection on Wednesday for the slaying nearly 21 years ago of James Byrd Jr, who was chained to the back of a truck and dragged for nearly three miles (five kilometers) along a secluded road in the piney woods outside Jasper, Texas. The 49-year-old Byrd was alive for at least two miles (three kilometers) before his body was ripped to pieces in the early morning hours of 7 June 1998.

Prosecutors said Byrd was targeted because he was black. King was openly racist and had offensive tattoos on his body, including one of a black man with a noose around his neck hanging from a tree, according to authorities.

King, 44, was put to death at the state penitentiary in Huntsville, Texas. He was the fourth inmate executed this year in the US and the third in Texas, the nation’s busiest capital punishment state.

King kept his eyes closed as witnesses arrived in the death chamber and never turned his head toward relatives of his victim. Asked by Warden Bill Lewis if he had a final statement, King replied: “No.”

Within seconds, the lethal dose of the sedative pentobarbital began taking effect. He took a few barely audible breaths and had no other movement. He was pronounced dead at 7.08pm CDT, 12 minutes after the drug began.

As witnesses emerged from the prison, about two dozen people standing down the street began to cheer.

The killing of Byrd was a hate crime that put a national spotlight on Jasper, a town of about 7,600 residents near the Texas-Louisiana border that was branded with a racist stigma it has tried to shake off ever since. Local officials say the reputation is undeserved.

King’s appellate lawyers had tried to stop his execution, arguing King’s constitutional rights were violated because his trial attorneys didn’t present his claims of innocence and conceded his guilt.

The US supreme court rejected King’s last-minute appeal.

“From the time of indictment through his trial, Mr King maintained his absolute innocence, claiming that he had left his co-defendants and Mr Byrd sometime prior to his death and was not present at the scene of his murder. Mr King repeatedly expressed to defense counsel that he wanted to present his innocence claim at trial,” A Richard Ellis, one of King’s attorneys, wrote in his petition to the supreme court.

The Texas Board of Pardons and Paroles also turned down King’s request for either a commutation of his sentence or a 120-day reprieve.

Over the years, King had also suggested the brutal slaying was not a hate crime, but a drug deal gone bad involving his co-defendants.

King, who grew up in Jasper and was known as “Bill,” was the second man executed for Byrd’s killing. Lawrence Russell Brewer was executed in 2011. The third participant, Shawn Allen Berry, was sentenced to life in prison.

King declined an interview request from the Associated Press in the weeks leading up to his execution.

In a 2001 interview with the AP, King said he was an “avowed racist” but wasn’t “a hate-monger murderer”.

Louvon Byrd Harris, one of Byrd’s sisters, said King’s execution sent a “message to the world that when you do something horrible like that, that you have to pay the high penalty”.

Compared to “all the suffering” her brother suffered before his death, Harris said King and Brewer got “an easy way out”.

Billy Rowles, who led the investigation into Byrd’s death when he was sheriff in Jasper county, said after King was taken to death row in 1999, he offered to detail the crime as soon as his co-defendants were convicted. When Rowles returned, all King would say was, “I wasn’t there.”

“He played us like a fiddle, getting us to go over there and thinking we’re going to get the rest of the story,” said Rowles, who now is sheriff of Newton county.

A week before Brewer was executed in 2011, Rowles said he visited Brewer, who confirmed “the whole thing was Bill King’s idea”.

Mylinda Byrd Washington, another of Byrd’s sisters, said she and her family will work through the Byrd Foundation for Racial Healing to ensure her brother’s death continues to combat hate everywhere.

“I hope people remember him not as a hate crime statistic. This was a real person. A family man, a father, a brother and a son,” she said.

