Records reveal details of South Carolina church gunman's mental health
Dylann Roof (Mugshot)

The white supremacist who murdered nine black parishioners in a racially motivated attack at a South Carolina church suffered from a number of mental disorders, his attorney said ahead of his federal trial, according to newly unsealed court documents.

Dylann Roof, 22, was sentenced to death in January after being convicted of hate crimes, obstruction of religion resulting in death and firearms charges for the massacre during a Bible study meeting at Emanuel African Methodist Episcopal Church in Charleston on June 17, 2015.

Roof's mental health records so far remain private. But documents unsealed by U.S. District Judge Richard Gergel on Wednesday provide a glimpse of the psychological issues raised as defense lawyers questioned Roof's competency.

On Dec. 6, a day before the guilt phase of Roof's federal death penalty trial began, defense lawyer David Bruck asked Gergel for accommodations in court to help Roof understand the proceedings.

A psychiatrist who examined Roof as his mental capacity to stand trial was weighed found he suffered from a social anxiety disorder, mixed substance abuse, a schizoid personality disorder and a possible autistic spectrum disorder, and had a history of depression, the court records show.

The defense said another expert also had offered evidence at a competency hearing of an autism diagnosis.

Roof's high IQ "is compromised by a significant discrepancy between his ability to comprehend and to process information and a poor working memory," the defense argued in the unsealed motion.

Roof underwent two competency hearings during his trial, and Gergel ruled the defendant was fit to face a jury and represent himself during the sentencing phase.

During Roof's opening statement to jurors last month, he said there was nothing wrong with him psychologically.

He faces a second death sentence if convicted of murder charges in state court. No trial date has been set.

(Reporting by Harriet McLeod; Editing by Lisa Shumaker; Editing by Colleen Jenkins)