Alabama has executed convicted murderer Kenneth Eugene Smith with nitrogen gas, the first time the method of capital punishment has been used in the US.
Smith, 58, lost two final appeals to the Supreme Court and one to a federal appeals court, arguing the execution was a cruel and unusual punishment.
In 2022, Alabama tried and failed to execute Smith by lethal injection.
He was convicted in 1989 of murdering a preacher's wife, Elizabeth Sennett, in a killing-for-hire.
Smith is the first person to be put to death using pure nitrogen gas in the US and, according to the Death Penalty Information Centre anywhere in the world.
Breathing the gas without oxygen causes the cells to break down and leads to death. Alabama said in an earlier court filing that it expected Smith to lose consciousness within seconds and die in a matter of minutes.
But the method was denounced by some medical professionals, who warned it could cause a range of catastrophic mishaps, ranging from violent convulsions to survival in a vegetative state.
Last week, the UN's High Commissioner for Human Rights urged a halt to the execution, saying that gassing Smith could amount to torture or other cruel, inhuman or degrading treatment under international human rights law.
Alabama and two other US states have approved the use of nitrogen hypoxia as an alternative method of execution because the drugs used in lethal injections have become more difficult to find, contributing to a fall in the use of the death penalty nationally.
Five members of the media were transported by van to Holman Correctional Facility in Atmore to witness the execution.
"Tonight Alabama causes humanity to take a step backwards," Smith said, according to witnesses. "Thank you for supporting me. Love all of you."
After the gas began to flow into his mask, the inmate is said to have smiled, nodded toward his family and signed "I love you".
Witnesses observed two to four minutes of writhing and about five minutes of heavy breathing before he died.
Alabama Governor Kay Ivey, who did not respond to a request to attend the execution, confirmed Smith's death in a statement.
"After more than 30 years and attempt after attempt to game the system, Mr Smith has answered for his horrendous crimes," she said.
"I pray that Elizabeth Sennett's family can receive closure after all these years dealing with that great loss."
Attorney General Steve Marshall said the method had proved to be "an effective and humane method of execution", refuting the "dire predictions" of activists and the media.
"Justice has been served," his statement added.
Smith was one of two men convicted of murdering Sennett in a US$1000 (approx NZ$1636) killing-for-hire in March 1988.
The 45-year-old was beaten with a fireplace implement and stabbed in the chest and neck, and her death was staged to look like a home invasion and burglary.
Her husband Charles Sennett, a debt-ridden preacher, had orchestrated the scheme to collect insurance money. He killed himself as investigators closed in.
Smith's fellow hitman, John Forrest Parker, was executed in 2010.
At his trial Smith admitted to being present when the victim was killed, but said he did not take part in the attack.
Earlier on Thursday, the Alabama Department of Corrections shared details from the inmate's final 48 hours.
Smith was visited by members of his family, two friends, his spiritual adviser and his attorney.
He had a breakfast of two biscuits, eggs, grape jelly, applesauce and orange juice.
His final meal was steak and eggs with hash browns.
Alabama tried to execute Smith by lethal injection two years ago, but they were unable to raise a vein before the state's death warrant expired.
On Thursday night, the Supreme Court denied him a last-minute reprieve.
Three liberal justices dissented from the conservative-led majority's ruling.
"Having failed to kill Smith on its first attempt, Alabama has selected him as its 'guinea pig' to test a method of execution never tested before," Justice Sonia Sotomayor wrote. "The world is watching."
The Supreme Court declined to intervene in response to another challenge relating to Smith's case on Wednesday night. No justice publicly dissented from that ruling.
- This story was first published by the BBC.