Roof and his attorneys appealed the death sentence in May of this year, arguing a trial judge ignored Roof’s delusions and he wasn’t competent to stand trial. A three-judge panel from the U.S. Fourth Circuit Court unanimously affirmed the trial judge’s original decision that Roof was competent.

Authorities claim Roof opened fire during the closing prayer of a Bible study at the Mother Emanuel AME Church in Charleston, South Carolina, in 2015. He was 21 at the time at the time of the shootings. Two years later, Roof became the first person in the U.S. sentenced to death for a federal hate crime.

In December 2016, Roof was convicted in federal court of 33 federal charges, including hate crimes, and was sentenced to death in January 2017. The following March he pleaded guilty in South Carolina state court to state charges and was given nine consecutive life sentences.

In his appeal, Roof’s attorneys argued he should not have been permitted to represent himself during the sentencing. The lawyers argued Roof prevented jurors from hearing crucial evidence regarding his mental health, because he was “too disconnected from reality” and believed “he would be rescued from prison by white-nationalists—but only, bizarrely, if he kept his mental-impairments out of the public record.”

Roof’s attorneys said his convictions and death sentence should either be vacated or his case should be re-tried for a “proper competency evaluation.”

The panel of judges disagreed with the attorneys’ argument and offered the following assessment in their written conclusion of the 149-page opinion:

“Dylann Roof murdered African Americans at their church, during their Bible-study and worship. They had welcomed him. He slaughtered them. He did so with the express intent of terrorizing not just his immediate victims at the historically important Mother Emanuel Church, but as many similar people as would hear of the mass murder.”

The judges continued, “No cold record or careful parsing of statutes and precedents can capture the full horror of what Roof did. His crimes qualify him for the harshest penalty that a just society can impose.”