TERRE HAUTE, Ind. (AP) — The United States on Thursday carried out its second federal execution this week, killing by lethal injection a Kansas man whose lawyers contended he had dementia and was unfit to be executed.

Wesley Ira Purkey was put to death at the Federal Correctional Complex in Terre Haute, Indiana. Purkey was convicted of kidnapping and killing a 16-year-old girl before dismembering, burning and dumping her body in a septic pond. He also was convicted in a state court in Kansas after using a claw hammer to kill an 80-year-old woman who had polio.

Purkey expressed remorse right before he was executed.

“I deeply regret the pain and suffering I caused to Jennifer’s family,” he said. “I am deeply sorry. I deeply regret the pain I caused to my daughter, who I love so very much. This sanitized murder really does not serve no purpose whatsoever.”

His time of death was 8:19 a.m. EDT.

The Supreme Court cleared the way for the execution to take place just hours before, ruling in a 5-4 decision. The four liberal justices dissented, like they did for the first case earlier this week.

Justice Sonia Sotomayor wrote that “proceeding with Purkey’s execution now, despite the grave questions and factual findings regarding his mental competency, casts a shroud of constitutional doubt over the most irrevocable of injuries.” She was joined by Ruth Bader Ginsburg, Stephen Breyer and Elena Kagan.

But a lower court put an emergency hold on the execution for one hour as it weighed issues in the case, further delaying what initially had been slated for Wednesday evening at the Federal Correctional Complex in Terre Haute, Indiana.

Purkey was convicted of kidnapping, raping and killing a 16-year-old girl before dismembering, burning and then dumping her body in a septic pond. He also was convicted in a state court in Kansas after using a claw hammer to kill an 80-year-old woman who suffered from polio.

On Tuesday, Daniel Lewis Lee was put to death at the facility after his eleventh hour legal bids failed. It was the first federal execution after a 17-year hiatus.

Lawyers for the 68-year-old Purkey, of Kansas, argued that he has dementia and is unfit to be executed. They said his condition has deteriorated so severely that he didn't understand why he was being executed. They also said that if Purkey's execution did not take place Wednesday, the government would need to set a new date. But government lawyers said there was no obstacle to going through with the execution Thursday if the Supreme Court lifted the injunctions.

The issue of Purkey’s mental health arose in the run-up to his 2003 trial and when, after the verdict, jurors had to decide whether he should be put to death in the killing of 16-year-old Jennifer Long in Kansas City, Missouri. Prosecutors said he raped and stabbed her, dismembered her with a chainsaw, burned her and dumped her ashes 200 miles (320 kilometers) away in a septic pond in Kansas. Purkey was separately convicted and sentenced to life in the beating death of 80-year-old Mary Ruth Bales, of Kansas City, Kansas, who suffered from polio.