Scott Panetti is scheduled for execution in Texas on December 3, 2014. His attorneys found out when they read it in the newspaper. Although the execution date has been set two weeks earlier, the state provided his attorneys with no notice. This shortcoming was only the latest in a long series of disturbing events surrounding Panetti’s trial, conviction, and death sentence.

Panetti has suffered from schizophrenia and other mental illness for over thirty years. He first exhibited signs of a psychotic disorder as a teenager. Beginning in 1978, he was hospitalized for mental illness on fifteen separate occasions. He developed a delusion that he was engaged in spiritual warfare with Satan. He tried to exorcize his home by burying furniture in the backyard because, he claimed, the devil was in it. He was involuntarily committed after swinging a sword at his wife and daughter and threatening to kill them.

In 1992, Panetti went off his medication, shaved his head, and dressed in camouflage fatigues. He went to his in-laws house and murdered his mother and father-in-law in front of his wife and daughter.

The subsequent trial and sentencing bordered on the unbelievable. Panetti was allowed to represent himself during both the guilt and penalty phases of the proceedings. He wore a cowboy costume and a purple bandana to court. He attempted to subpoena John F. Kennedy, the Pope, and Jesus Christ, among 200 others. His statements were rambling and incoherent. He fell asleep during trial. While describing the shooting, he assumed the personality of a character he called “Sarge” and narrated the events in the third person. He pointed an imaginary rifle at jurors, visibly frightening them. His stand-by attorney called the trial a “judicial farce.”

Unsurprisingly, a jury convicted Panetti of murder. After calling only one witness—his stand-by counsel—at the penalty phase of his trial, the jury sentenced Panetti to death after only one day of deliberation.

As with many individuals on death row, a long series of appeals followed, focusing on Panetti’s mental illness. In October, the U.S. Supreme Court denied Panetti’s petition for review, and Texas courts have thus far declined to grant a stay of execution to allow time for an assessment of his competency for execution. Panetti has not received a competency evaluation in nearly seven years.

No one could dispute that Panetti’s actions were atrocious beyond words. The death of two innocent people is an unspeakable tragedy. But the execution of a man grievously afflicted by mental illness for three decades would in no way compensate for the murder of his in-laws.

The U.S. Supreme Court, in a 1986 case called Ford v. Wainwright, prohibited the execution of people who are so out of touch with reality that they do not know right from wrong and cannot understand their punishment or the purpose of it. Panetti’s attorneys argue that this holding applies to him. His severe mental illness causes him to believe that Satan, working through the state of Texas, is seeking to execute him for preaching the Gospel—and, therefore, he cannot possess a rational understanding of the link between his crime and his punishment. To most people, Panetti’s lengthy history of mental illness and his bizarre behavior strongly suggest that Ford should prevent his execution. Yet in practice, Ford’s guarantee is often compromised when courts refuse to order mental health evaluations in a timely fashion, as Panetti’s seven years without a competency evaluation illustrate all too clearly.

His imminent execution reveals just one of many reasons the death penalty in its current form is profoundly flawed. Across the country, the death penalty is administered in a wildly arbitrary way among offenders who have committed similar crimes. For example, one of us found in recent research that while the death penalty was an option in approximately 92 percent of all first-degree murders during one decade in Colorado, it was sought by the prosecution in only three percent of those killings and obtained in only 0.6 percent of cases. And Colorado is hardly unique. Justice administered so unevenly is no justice at all.

Likewise, the recent botched executions of Clayton Lockett in Oklahoma and Joseph Wood in Arizona show that the methods of execution are both cruel and unusual. Executioners lack basic training, shortages of drugs previously used in executions have led states to experiment with different lethal injection cocktails, and courts have prevented attorneys for those sentenced to die from accessing information about the details of an upcoming execution.

Massive procedural irregularities compound these problems. A recent series by the Marshall Project exposed how death row inmates often lose their cases simply because they miss filing deadlines, often as the result of their attorneys’ incompetence. Such attorneys include a recently-disbarred lawyer who dressed as Thomas Jefferson at his own disbarment proceeding. In many instances, they forfeit strong claims of factual innocence, juror misconduct, or compromised trial proceedings. Other systemic issues, ranging from a perennial shortage of public defenders to racial bias in death sentences, continue to plague capital proceedings.

Many scholars and experts believe that these and other problems with the death penalty render it constitutionally infirm. But many who do not oppose the death penalty altogether still oppose Panetti’s execution. A broad and diverse coalition has urged Governor Rick Perry to commute Panetti’s death sentence to life in prison, including the American Psychiatric Association, former Texas Governor Mark White, more than fifty evangelical leaders from around Texas and the United States, the American Bar Association, ten Texas state legislators, former U.S. Representative Ron Paul, and the European Union.

But on Tuesday, the Texas Court of Criminal Appeals denied Panetti’s emergency request for stay of execution in a splintered 5-4 decision. A dissent by Judge Elsa Alcala wrote, “[T]his Court, at best, deprives appellant of a fair opportunity to litigate his claims, thereby violating the constitutionally required procedural protections recognized in Ford. At words, this Court’s decision will result in the irreversible and constitutionally impermissible execution of a mentally incompetent person.”

After the Court’s decision, Perry may indeed be Panetti’s best hope for clemency. The question, then, is whether Perry will recognize that executing someone who understands neither his crime nor the punishment for it makes a mockery of justice.