Roof was charged with nine counts of murder and possession of a firearm on Friday, police said.
Joey Meek, a former friend who reconnected with Roof a few weeks ago, said that while they got drunk on vodka, Roof declared that "someone needed to do something about it for the white race."
Roof, 21, is accused of fatally shooting nine people during a Bible study at The Emanuel African Methodist Episcopal Church in Charleston on Wednesday night, ripping out a piece of South Carolina's civic heart and adding to the ever-growing list of America's racial casualties.
According to the Charleston Post and Courier, Roof is in the jail cell adjacent to Michael Slager, the North Charleston police officer who shot and killed 50-year-old Walter Scott on April 4.
Police captured Roof in Shelby, North Carolina, after a motorist spotted him at a traffic light on her way to work. Roof was back in Charleston on Thursday night with a bond hearing pending, authorities said.
Charleston officials announced a prayer vigil for Friday evening. The city's mayor described the shooting at the church as an act of "pure, pure concentrated evil."
The victims included a state senator who was also the church's minister, three other pastors, a regional library manager, a high school coach and speech therapist, a government administrator, a college enrollment counselor and a recent college graduate.
President Barack Obama called the tragedy yet another example of damage caused by guns in America.
NAACP President and CEO Cornell William Brooks said "there is no greater coward than a criminal who enters a house of God and slaughters innocent people." Others bemoaned the loss to a church that has served as a bastion of black power for 200 years, despite efforts by white supremacists to wipe it out.
"Of all cities, in Charleston, to have a horrible hateful person go into the church and kill people there to pray and worship with each other is something that is beyond any comprehension and is not explained," said Mayor Joseph P. Riley Jr. "We are going to put our arms around that church and that church family."
Surveillance video showed the gunman entering the church Wednesday night, and initially didn't appear threatening, Charleston County Coroner Rae Wilson said.
"The suspect entered the group and was accepted by them, as they believed that he wanted to join them in this Bible study," she said. Then, "he became very aggressive and violent."
Meek called the FBI after recognizing Roof in the video, down to the stained sweatshirt he wore while playing videogames in Meek's home the morning of the attack.
"I knew it was him," Meek told The Associated Press after being interviewed by investigators.
During their reunion a few weeks ago, Roof said he had bought a .45-caliber Glock pistol and that he had "a plan," Meek said. Meek said it scared him enough that he took the gun out of Roof's car and hid it in his house until the next day.
It's not clear whether Roof had any connection to the 16 white supremacist organizations operating in South Carolina.
On his Facebook page, Roof displayed the flags of defeated white-ruled regimes, posing with a Confederate flags plate on his car and wearing a jacket with stitched-on flag patches from apartheid-era South Africa and Rhodesia, which is now black-led Zimbabwe.
His police record includes misdemeanor drug and trespassing charges.
Spilling blood inside a black church — especially "Mother Emanuel," founded in 1816 — evoked painful memories nationwide, a reminder that black churches so often have been the targets of racist violence.
A church founder, Denmark Vesey, was hanged after trying to organize a slave revolt in 1822, and white landowners burned the church in revenge. Decades later, the congregation rebuilt and grew stronger, eventually winning campaigns for voting rights and political representation.
Its lead pastor, state Sen. Clementa Pinckney — among the dead — recalled his church's history in a 2013 sermon, saying "we don't see ourselves as just a place where we come to worship, but as a beacon and as a bearer of the culture."
"What the church is all about," Pinckney said, is the "freedom to be fully what God intends us to be and have equality in the sight of God. And sometimes you got to make noise to do that. Sometimes you may have to die like Denmark Vesey to do that."
Pinckney, 41, was a married father of two and a Democrat who served 19 years in the South Carolina legislature.
The other victims were Cynthia Hurd, 54; Tywanza Sanders, 26; Myra Thompson, 59; Ethel Lance, 70; Susie Jackson, 87; and the reverends DePayne Middleton Doctor, 49; Sharonda Singleton, 45; and Daniel Simmons Sr., 74.
Want to enjoy 'Zen' reading - with no ads and just the article? Subscribe todaySubscribe now