Mr. Roof is charged with 33 federal counts, including hate crimes resulting in death, and he is being tried only because the Justice Department rejected his offer to plead guilty in exchange for a life sentence. He also faces separate capital murder charges in a state trial scheduled for mid-January.

The racial rationale Mr. Roof provided to two F.B.I. agents, Michael E. Stansbury and Craig Januchowski, closely resembled the online manifesto he is alleged to have written shortly before the killings and a journal found afterward in his car. “Well I had to do it because somebody had to do something because, you know, black people are killing white people every day on the streets, and they rape white women, 100 white women a day,” he told the agents. “The fact of the matter is what I did is so minuscule to what they’re doing to white people every day, all the time.”

Mr. Roof, who noted the declining influence of hate groups like the Ku Klux Klan, said, “Nobody else is brave enough to do anything about it.”

In the courtroom, Mr. Roof, dressed in a gray cable-knit sweater, sometimes leafed through papers at the defense table as the grainy video recording played on several screens.

Mr. Roof, who is from Eastover, near Columbia, said in the interview that he had selected Emanuel, which was founded in 1818, because he knew it was historic and that he would find a concentration of African-Americans worshiping there. He said he did not know anything specific about its history and denied that his choice had any connection to the racial outcry surrounding the shooting of a black motorist by a white police officer in North Charleston two months earlier.

He also made it clear that the Wednesday night Bible study session provided an easy target. “Well it’s like this, you see, I’m not in the position, you know, by myself, you know, to go into like a black neighborhood, you know, or something like that and shoot up, you know, drug dealers or something like that,” he said. “You know what I’m saying? That’s not going to do anything. You see what I’m saying. I had to go somewhere else.”