CHARLESTON, S.C. (Reuters) - Jurors in the federal hate crimes trial of Dylann Roof watched a video on Friday of the avowed white supremacist confessing to killing nine parishioners at a historic black church in South Carolina and saying he felt he “had to do it.”

Police lead suspected shooter Dylann Roof into the courthouse in Shelby, North Carolina, U.S., June 18, 2015. REUTERS/Jason Miczek/File Photo

Roof told investigators after his arrest for the June 17, 2015, massacre at Emanuel African Methodist Episcopal Church in Charleston that he estimated he had killed five people as retribution for perceived racial grievances. He sounded surprised to learn nine parishioners died.

“I had to do it because somebody had to do it,” Roof said in the taped confession.

Asked if he had regrets, Roof said, “I’d say so, yes ... I regret that I did it, a little bit.”

Roof’s lawyers have not disputed his guilt but hope to spare him from being executed on charges of hate crimes resulting in death, obstruction of religion and firearms violations.

Roof, 22, also faces a death sentence if found guilty of murder charges in state court.

The videotaped confession, presented on the third day of his federal trial in Charleston, gave jurors a chance to hear the defendant explain why he carried out the attack on a Bible study meeting.

He appeared both animated and at ease as he spoke to investigators, laughing at times as he answered their questions.

Roof spoke with investigators in Shelby, North Carolina, where he was arrested about 13 hours after security video showed him leaving the church.

Inside his car, police said they found a journal where Roof wrote of his dreams for a race war and notes he wrote to his parents.

“Dear Mom, I love you,” read one note presented to jurors. “I’m sorry for what I did. I know this will have repercussions.”

In the video, Roof said white people needed to take a stand against crimes by African Americans.

“I don’t like what black people do,” Roof said, adding he was in favor of reinstating segregation.

He chose the Charleston church for the shooting because he knew “at least a small amount of black people” would be gathered there. Two adults and a child at the Bible study survived.

“It’s like this,” Roof said. “I’m not in a position, by myself, to go into a black neighborhood and shoot drug dealers.”

Nobody ran when he opened fire, he said, and he recalled pausing between shots.

“I was thinking about what I should do,” he said.