Roof, 22, has confessed to killing nine members
of the historically black Emanuel African Methodist Episcopal Church during a Bible study in 2015.
The writings, read aloud by an FBI agent, were among several pieces of evidence presented by the prosecution. They reveal why he chose Charleston as the site of his massacre -- and how he defended his white supremacist views.
'Awakened' by Trayvon Martin case.
Roof said he had an epiphany after learning about the killing of Trayvon Martin
, an unarmed black teenager shot by neighborhood watch volunteer George Zimmerman in 2012.
"The event that truly awakened me was the Trayvon Martin case. I kept hearing and seeing his name, and eventually I decided to look him up," Roof wrote.
"I read the Wikipedia article and right away I was unable to understand what the big deal was. It was obvious that Zimmerman was in the right."
In another excerpt, Roof claimed that blacks are more likely to be violent.
"Negroes have lower Iqs, lower impulse control, and higher testosterone levels in generals," Roof wrote. "These three things alone are a recipe for violent behavior."
Eventually, Roof said he wanted to start a race war. And he decided to start with the historically black church, also known as Mother Emanuel.
"I have no choice. I am not in the position to, alone, go into the ghetto and fight," he wrote.
"I chose Charleston because it is most historic city in my state, and at one time had the highest ratio of blacks to Whites in the country."
So on June 17, 2015, Roof entered the Mother Emanuel church. The Bible study group welcomed him and gave him a sheet with religious verses
. He stayed with them for at least 15 minutes.
Then, as a dozen people stood for prayers with their eyes closed, Roof fired 70 rounds from a Glock .45-caliber pistol, prosecutors said.
"I didn't say anything to them," Roof said of his victims.
Laughing during his confession
Roof reiterated his racist beliefs to investigators in an FBI video of his confession, shown in court Friday.
"I went to that church in Charleston and I did it," Roof said, then laughed, the video showed.
"Did you shoot them?" a law enforcement officer asked.
"Yes," Roof replied, laughing again.
Asked how many people he killed that day, Roof replied calmly: "If I was going to guess, five maybe. I'm really not sure."
Targeting Hispanics, Jews and the American flag
Another revelation from the trial: Roof's writings slammed not just blacks, but also Hispanics and Jews.
"Hispanics are obviously a huge problem for Americans. But there are good hispanics and bad hispanics," Roof wrote.
"I don't pretend to understand why jews do what they do. They are enigma."
He also denounced the American flag.
"I hate the sight of the American flag. Modern American patriotism is an absolute joke," Roof wrote. "People pretending like they have something to be proud while White people are being murdered daily in the streets."
Tuesday marks the fifth day of testimony for the guilt phase of Roof's trial.
He has pleaded not guilty to 33 federal charges, including:
-- Nine counts of violating the Hate Crime Act resulting in death
-- Nine counts of use of a firearm to commit murder during and in relation to a crime of violence
-- Three counts of violating the Hate Crime Act involving an attempt to kill
-- Nine counts of obstruction of exercise of religion resulting in death
-- Three counts of obstruction of exercise of religion involving an attempt to kill and use of a dangerous weapon
The prosecution is expected to rest its case on Wednesday or Thursday, and the defense is expected to finish calling witnesses this week. Court will be in recess for the Christmas and New Year's holidays and the trial will resume on January 3.
If convicted, Roof could face the death penalty.