A U.S. federal appeals court issued a stay of execution for mentally ill Texas death row inmate Scott Panetti on Wednesday, who was set to be put to death for the murder of two people in 1992. (Reuters)

A federal appeals court stayed the scheduled execution of a Texas inmate Wednesday, just hours before he was expected to be put to death for killing his estranged wife’s parents.

The 5th U.S. Circuit Court of Appeals in New Orleans granted the stay for Scott Panetti, whose attorneys have argued that he is too mentally ill to be executed.

“We stay the execution pending further order of the court to allow us to fully consider the late arriving and complex legal questions at issue in this matter,” Wednesday’s ruling read. “An order setting a briefing schedule and oral argument will follow.”

Panetti wore camouflage when he drove to the home of Joe and Amanda Alvarado in 1992, breaking the lock on the front door, and entering the house. He killed his wife’s parents in front of both her and their daughter. He then held his wife and daughter hostage, before eventually surrendering to police.

According to the Associated Press:

At his trial, he acted as his own attorney, dressed in a purple cowboy outfit, attempted to subpoena more than 200 witnesses, including the pope and Jesus Christ, and took on an alternate personality, “Sarge,” to testify.

Earlier this week, the Texas Board of Pardons and Paroles declined to delay the execution or commute Panetti’s sentence to life. The vote was unanimous, the AP reported.

The case has drawn the attention of opponents of the death penalty, advocates for mental health reform, and a number of conservative leaders, who in November wrote Texas Gov. Rick Perry (R) and asked that Panetti’s sentence be commuted.

Panetti’s attorneys, Greg Wiercioch and Kathryn Kase, said in a statement that they were “grateful” for the court’s decision.

“We believe that people who live with severe mental illness should have treatment options to keep themselves and others safe,” the statement read. “When people who have severe mental illness enter our criminal justice system, the system has a moral obligation to respond appropriately to the limitations and deficits presented by mental illness.”

According to Texas Defender Services, the nonprofit for which Kase serves as executive director, Panetti has for decades struggled with mental illness, starting with a 1978 diagnosis of “early schizophrenia.”

Attorneys for the state have argued that Panetti, who was never found incompetent or insane during legal proceedings, was fit to stand trial. The state isn’t expected to immediately appeal the stay.

“Panetti’s assertion of severe mental illness are in doubt when compared to the multiple past findings on his sanity, competency to stand trial and competency to be executed, as well as evidence submitted by the state,” said Ellen Stewart-Klein, an assistant Texas attorney general, according to AP. “Panetti’s case is an inappropriate one to create a new rule of law.”

This post has been updated.