In 1992, Scott Panetti shaved his head, dressed himself in camo and fatally shot his in-laws in front of his wife and daughter. Afterward, he put on a suit and surrendered to police.

At his trial, Panetti wore a cowboy costume and acted as his own lawyer, waiving his right to counsel. He applied for 200 subpoenas that included John F. Kennedy and Jesus Christ. He asked prospective jurors whether they had any Indian blood in them. His opening statement referenced demons. And he referred to himself as Sergeant Iron Horse when he confessed to killing his wife’s parents. It wasn’t Scott who killed them, he said. It was Sarge.

Panetti’s defense appeared to be that of a seriously ill man. And by most accounts, he was. First diagnosed with early schizophrenia in 1978, Panetti had been in and out of a dozen mental hospitals over 14 years, regularly determined to have paranoia, depression, delusions and hallucinations and eventually deemed disabled by the Social Security Administration, qualifying him for monthly benefits before he turned 30. Since that first diagnosis, Panetti came to see life as a cosmic battle between good and evil, one in which he—or Sarge, or the other voices in his head—played a role.

In one instance, Panetti’s first wife came home to find that he had buried his furniture in the front yard because he believed he needed to purge Satan from the objects. In an affidavit, she said she believed her husband should be involuntarily committed and that he had become “obsessed with the idea that the devil was in our house.” Panetti’s explanation for killing the parents of his second wife was similar, according to his lawyers and court documents: the shootings were “Sarge’s” attempt to get rid of the devil he believed was inside his in-laws.

(MORE: Ohio Looks to Shield Lethal Injection Drugmakers)

In 1995, a jury found Panetti guilty and sentenced him to death. That sentence comes due Wednesday, when Panetti is scheduled to die by lethal injection. To some, it will be justice finally being served. But to Panetti’s lawyers and other supporters, the planned execution is unconstitutional, and evidence of a capital punishment system in dire need of reform.

Panetti’s attorneys are appealing to the Fifth Circuit Court of Appeals for a last-minute stay of execution, arguing that Panetti doesn’t understand he’s being executed for the double murder. They say Panetti hasn’t been given a competency hearing in seven years, and they believe his mental state has deteriorated since then. Panetti’s attorneys are challenging an earlier denial by an appeals court to hold a competency hearing, while also seeking a stay of execution from the Supreme Court on the grounds that putting to death someone who is mentally ill is unconstitutional under the Eighth Amendment’s ban on cruel and unusual punishment.

So far, courts haven’t been receptive to those arguments. Several witnesses for the state of Texas have testified that Panetti is competent and has an understanding of his crime. The state has provided hours of audio recordings of Panetti discussing the murders in which he “spoke rationally, demonstrated a fairly sophisticated understanding of his case, and discussed in an intelligent manner the death penalty and its moral implications,” according to court documents.

Kathryn Kase, executive director of the Texas Defender Service who is representing Panetti, questions those accounts and says that his history with mental illness alone should be enough to prevent him from being executed.

(MORE: Utah Looks to Old Execution Method: Firing Squad)

“This is not a situation where a guy gets admitted to a hospital once and comes out and commits a crime,” Kase says. “These were multiple hospital admissions over a 12-year period. This is a pretty astonishing and well-documented history of mental illness. Nobody exists for 36 years like this in an effort to get off the hook of criminal responsibility.”

Dozens of mental health professionals and organizations have come out in support of clemency for Panetti, including the National Alliance for the Mentally Ill and Mental Health America. But time is running out.

Panetti would be the 11th inmate executed in Texas this year, the most of any state. For years, Texas has killed more death row inmates than any other state.

Kase, who visited Panetti a couple weeks ago, says his mental health is worsening, possibly due to stress related to the upcoming execution date.

“He is extremely paranoid, and he is delusional,” Kase says. “And these delusions are that the prison wants to kill him to prevent him from preaching the gospel on death row or telling others about corruption at TDCJ [the Texas Department of Criminal Justice]. We’re not psychologists. We’re not mental health professionals. But we do know we’re seeing something really terrible happen.”

Read next: 103-Year-Old Texas Woman Fights to Keep Her House

Contact us at letters@time.com.