A federal appeals court upheld Dylann Roof's conviction and death sentence for killing nine members of a Black South Carolina church, the Associated Press reports.

In 2017, Roof became the first person in the U.S. sentenced to death for a federal hate crime, as Blavity previously reported. Roof, who was 21 at the time, killed nine members of the Mother Emanuel AME Church in Charleston, South Carolina, and had expressed white supremacist views.

He told the FBI he targeted the church because of its historically Black congregation and membership.

In the hearing held at the 4th U.S. Circuit Court of Appeals in Richmond on Wednesday, a three-judge panel affirmed Roof's previous conviction and sentence in the shooting at Mother Emanuel AME Church in Charleston. The panel ruled that the trial judge did not commit any errors by finding Roof competent to stand trial.

"Dylann Roof murdered African Americans at their church, during their Bible-study and worship,” the panel’s ruling read. “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.”

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

Roof's lawyers said that witnesses were prepared to testify about his mental state and if the jury would have heard their testimonies, the outcome of the ruling may have been different, according to reports from WCSC 5.

Roof underwent two hearings to gauge his competency. The first hearing was in 2016 before his trial began and the second hearing took place to determine if he was capable of representing himself during sentencing after he fired his attorney before the penalty phase of the trial.

The prosecution argued that Roof’s attorneys never offered adequate evidence that he was mentally incompetent to stand trial.

“This is a problem that certainly could have been solved at the time with appropriate attention from Roof or from his standby counsel,” Department of Justice attorney Ann O’Connell Adams said. “I don’t think there’s any chance the jury would have returned a different verdict if they found the government could deal with Roof as he continued to misbehave in prison.”