The testimony presented by prosecutors during the guilt phase of Mr. Roof’s trial detailed with gruesome precision how he had plotted and executed the massacre during a Wednesday night Bible study in the church’s fellowship hall. It was less satisfying in revealing why he had done it. With his choice to sideline his legal team and represent himself, the second phase — when the same jury of nine whites and three blacks will decide whether to sentence him to death or to life in prison — may prove little different.

Death penalty experts said it was exceedingly rare for capital defendants to represent themselves after allowing lawyers to handle the initial part of a case. Mr. Roof, who also faces a death penalty trial in state court, has not publicly explained his reasoning. But legal filings strongly suggest a split with his court-appointed defenders about whether to argue that his rampage resulted from mental illness.

Mr. Roof’s lead lawyer, David I. Bruck, tried repeatedly to plant that notion during the guilt phase, knowing it might be his only chance. Because evidence of mitigating factors is supposed to be reserved for the penalty phase, Judge Gergel allowed him little leeway.

In his closing argument, while acknowledging Mr. Roof’s guilt, Mr. Bruck managed to tell the jury that Mr. Roof subscribed to “the mad idea that he can make things better by massacring the most virtuous, kind and gentle people he could ever have found.” Mr. Bruck seeded his speech with words like “abnormal,” “irrationality,” “senselessness,” “delusional,” “obsession” and “perseveration,” a psychiatric term referring to the uncontrollable repetition of a particular response.

Mr. Bruck, one of the country’s most experienced death penalty litigators, portrayed his 22-year-old client as a loner whose most meaningful relationship seemed to be with his cat; who staged hundreds of photographs of himself with no sign of friends; whose racial hatred was ignited by internet searches and not personal experience; who could not pinpoint during his confession to the F.B.I. how many he had killed, how long he had spent at the church or even what month it was; who had no escape plan and left suicide notes to his parents.