(CNN) -- Dylann Roof confessed almost immediately to the massacre at Emanuel African Methodist Episcopal Church, according to an FBI video shown Friday at his murder trial in Charleston, South Carolina.
"I went to that church in Charleston and I did it," he said with a laugh.
"Did you shoot them?" a law enforcement officer asked.
"Yes," replied Roof, laughing again.
Asked how many people he killed that day, the young man in the mushroom haircut calmly replied: "If I was going to guess, 5 maybe. I'm really not sure."
In the video, Roof said he opened fire with a Glock .45-caliber pistol.
"I didn't say anything to them," he said of his victims.
What about after the shootings?
"I didn't talk to them."
Roof admitted in the video sitting with his victims about 15 minutes.
"It was a bible study," he said.
He had seven magazines with him, he told investigators. A bag and his weapon.
"I was sitting there thinking if I should do it or not for 15 minutes," Roof said, according to the video. "I could have walked out. I don't want to say it was spur of the moment."
Before his confession, Roof munched on Burger King hamburger brought to him by police officers.
The showing of the video to the jury Friday morning caps a dramatic and emotional week in court.
Roof's mother passed out and collapse during a lunch recess in the courtroom Wednesday. His attorney said in a court filing that she suffered a heart attack.
Dylann Roof was "cold and calculating" in planning an attack, a federal prosecutor said Wednesday in opening statements at Roof's trial in Charleston, South Carolina.
Roof studied the church's long history in the black community, found out what time a Bible study class would be held, loaded his gun the night before, packed extra ammunition and drove more than an hour to the church, Assistant US Attorney Jay Richardson told the jury of nine whites and three African-Americans.
He was welcomed into the Bible study and displayed a "cold and hateful heart" by sitting with the group more than 30 minutes, Richardson said.
As the 12 people stood to offer prayers and close their eyes, Roof opened fire with the pistol, firing 70 rounds, Richardson said. Nine people were killed.
Tywanza Sanders, one of those killed, told Roof that he didn't have to shoot them, saying, "We mean you no harm," the prosecutor said, recounting the story of one of the survivors.
Roof, who is white, replied, "Y'all are raping our white women, y'all are taking over the world," Richardson said.
After he was captured, authorities learned Roof had written a "manifesto" of his racist beliefs and posed for photos with the US flag burning in one hand and the Confederate flag in the other, Richardson said.
Roof also designed his own logo that included his initials, a swastika and the number 88, which for white supremacists stands for "Heil Hitler," the prosecutor said. "He created the symbol to reflect who he was, what he thought and what he had done," Richardson said.
Opening for the defense, attorney David Bruck told the jury, "You're probably wondering why there has to be a trial."
Authorities previously said Roof had confessed to the killings and told the FBI that he hoped to provoke a race war.
The practical reason for the trial, Bruck said, is that the government has asked for the death penalty.
Bruck said the jury will decide guilt or innocence in the first phase of the trial. In the second phase, the jury will decide on punishment.
Bruck reminded the jury of Roof's youth and urged them to try to understand him. Roof told the FBI he didn't have any friends, Bruck said.
Jurors should ask where Roof's feelings of racial hatred came from, Bruck said.
"How much sense does this crime make, does it make any sense and if any at all, what does that tell you?" he asked.
Bruck ended by saying he probably would not call any witnesses.
Roof sat mostly motionless in his state-issued, gray-and-white striped jumpsuit throughout both opening statements, barely looking up from the defense table.
™ & © 2016 Cable News Network, Inc., a Time Warner Company. All rights reserved.