Charleston, South Carolina (CNN) Before he allegedly opened fire on members of a Bible study group at a church in Charleston, South Carolina, Dylann Roof sat with them. He might have prayed with them.

A Snapchat video from Wednesday night at the historic African-American church shows Roof at a table with the small group. Nothing in the footage suggests the carnage to come.

Police say Roof shot and killed nine people inside the historic Emanuel African Methodist Episcopal Church, near the heart of Charleston's tourist district. Eight died at the scene; a ninth died at a hospital.

Authorities were shocked not only by the killings but that the violence occurred in a house of worship.

"People in prayer Wednesday evening. A ritual, a coming together, praying, worshiping God. An awful person to come in and shoot them is inexplicable," said Charleston Mayor Joe Riley.

Six women and three men were killed, including the church's politically active pastor, the Rev. Clementa Pinckney.

Sylvia Johnson, a cousin of Pinckney, said she heard about what happened inside the church from a survivor, a close friend.

The Rev. Clementa Pinckney speaks at the church in Charleston in December 2012.

Johnson told CNN her friend recounted the man coming into the church, asking for the minister.

"My cousin, being the nice, kind, welcoming person he is, he welcomed him to his congregation, welcomed him to the Bible study, and he sat there for an hour ... At the conclusion of the Bible study, they just heard just a ringing of a loud noise, and it was just awful from what I heard," Johnson said.

When the son of her friend pleaded with the shooter to stop, Johnson said the gunman replied: "'No, you've raped our women, and you are taking over the country ... I have to do what I have to do.' And he shot the young man."

Her friend pretended she was dead.

"But she watched her son fall and laid there. She laid there in his blood," Johnson said.

From what she heard, the gunman reloaded five times.

Before he left the church, he asked one of the elderly members whether he had shot her, and she said no.

"And he said good, because we need a survivor because I'm going to kill myself," Johnson told CNN.

A law enforcement official said witnesses told authorities the gunman stood up and said he was there "to shoot black people."

The president of the NAACP expressed his outrage at the violence.

"There is no greater coward than a criminal who enters a house of God and slaughters innocent people engaged in the study of scripture," Cornell William Brooks said.

Photos: Reactions to Charleston church shooting Thousands of people march on the Arthur Ravenel Jr. Bridge in Charleston, South Carolina, on Sunday, June 21. People crossed the bridge, which spans the Cooper River, from Mount Pleasant to Charleston, joining hands in a unity chain to mourn the Emanuel AME Church shooting. Police arrested Dylann Storm Roof in the slayings of nine people at a prayer meeting at the church. Hide Caption 1 of 25 Photos: Reactions to Charleston church shooting Protesters stand on the South Carolina State House steps during a rally to take down the Confederate flag, on Saturday, June 20, in Columbia. Hide Caption 2 of 25 Photos: Reactions to Charleston church shooting Louise Brown walks down King Street during a "Black Lives Matter" march on June 20 in Charleston, South Carolina. Hide Caption 3 of 25 Photos: Reactions to Charleston church shooting The men of Omega Psi Phi Fraternity lead a prayer outside Emanuel AME Church, Friday, June 19. Hide Caption 4 of 25 Photos: Reactions to Charleston church shooting Young people grieve outside Emanuel African Methodist Episcopal Church in Charleston, South Carolina, on June 19. Hide Caption 5 of 25 Photos: Reactions to Charleston church shooting Parishioners applaud during a memorial service on Thursday, June 18, at Morris Brown AME Church in Charleston, South Carolina. Hide Caption 6 of 25 Photos: Reactions to Charleston church shooting Olina Ortega, left, and Austin Gibbs light candles at a sidewalk memorial in front of Emanuel AME Church on June 18. Hide Caption 7 of 25 Photos: Reactions to Charleston church shooting The Rev. Jeannie Smalls becomes emotional during a prayer vigil held at Morris Brown AME Church on June 18. Hide Caption 8 of 25 Photos: Reactions to Charleston church shooting A woman places flowers outside the church on June 18. Hide Caption 9 of 25 Photos: Reactions to Charleston church shooting Mourners gather for a community prayer service at Second Presbyterian Church in Charleston on June 18. Hide Caption 10 of 25 Photos: Reactions to Charleston church shooting Walter Jackson, the son of Susie Jackson who died in the church shooting, recalls stories about his mother with his niece Cynthia Taylor at Jackson's home in Charleston on June 18. Hide Caption 11 of 25 Photos: Reactions to Charleston church shooting The Rev. Al Sharpton wipes away a tear after praying outside the Emanuel AME Church in Charleston on June 18. Hide Caption 12 of 25 Photos: Reactions to Charleston church shooting People sit on the steps of Morris Brown AME Church in Charleston while services are held June 18. Hide Caption 13 of 25 Photos: Reactions to Charleston church shooting A woman wipes her eyes at a makeshift memorial near the Emanuel AME Church in Charleston on June 18. Hide Caption 14 of 25 Photos: Reactions to Charleston church shooting The Rev. Keith McDaniel, pastor of Macedonia Missionary Baptist Church, is surrounded by others in prayer on June 18 in Spartanburg, South Carolina. Hide Caption 15 of 25 Photos: Reactions to Charleston church shooting Tyler Francis, right, hugs Shondrey Dear after praying together June 18 at a makeshift memorial near the Emanuel AME Church. Hide Caption 16 of 25 Photos: Reactions to Charleston church shooting A group of women prays together at a makeshift memorial on the sidewalk in front of the Emanuel AME Church on June 18. Hide Caption 17 of 25 Photos: Reactions to Charleston church shooting President Barack Obama, accompanied by Vice President Joe Biden, pauses while speaking in the Brady Press Briefing Room of the White House in Washington, June 18, on the church shooting in Charleston. Hide Caption 18 of 25 Photos: Reactions to Charleston church shooting Members of the U.S. Congress gather in front of the Capitol Building in Washington on June 18, during a moment of silence for the nine killed in a church shooting in Charleston, South Carolina. Hide Caption 19 of 25 Photos: Reactions to Charleston church shooting South Carolina state Sen. Vincent Sheheen gets emotional on June 18 as he sits next to the draped desk of Sen. Clementa Pinckney at the statehouse in Columbia, South Carolina. Pinckney was one of the nine people killed in the church shooting. Hide Caption 20 of 25 Photos: Reactions to Charleston church shooting Charleston resident Noah Nicolaisen kneels at a makeshift memorial down the street from the church on June 18. Hide Caption 21 of 25 Photos: Reactions to Charleston church shooting Kim Hamby prays with her daughter Kayla as they lay flowers at a makeshift memorial in Charleston on June 18. Hide Caption 22 of 25 Photos: Reactions to Charleston church shooting A man leans against a light pole as he visits a memorial in Charleston on June 18. Hide Caption 23 of 25 Photos: Reactions to Charleston church shooting Chaplain James St. John leads senators in prayer June 18 at the statehouse in Columbia. Hide Caption 24 of 25 Photos: Reactions to Charleston church shooting Sandra Bridges lays a card at a memorial on June 18. Hide Caption 25 of 25

The suspect

Roof, 21, of Lexington, South Carolina, was arrested Thursday morning about 245 miles (395 kilometers) away in Shelby, North Carolina. He waived extradition and arrived back in South Carolina late Thursday.

JUST WATCHED Video of Charleston church shooting suspect Replay More Videos ... MUST WATCH Video of Charleston church shooting suspect 00:21

He was taken into custody without incident shortly before 11 a.m., Shelby police said in a statement. Authorities got a call about a possible sighting of the suspect. A local newspaper filled in some of the details.

Police got a tip from Debbie Dills, who reportedly spotted Roof on her way into work. She followed him for 35 miles, the Shelby Star reported.

"I had been praying for those people on my way to work," Dills told the newspaper about victims of the church shooting. "I was in the right place at the right time."

At 10:43 a.m., officers saw the suspect's vehicle, and stopped it at 10:44 a.m., police said. Roof was the vehicle's only occupant.

He was armed with a gun when he was arrested, according to a law enforcement official briefed on the investigation. It's not clear if it's the same firearm used in the shooting.

It's uncertain who bought the gun Roof used.

A senior law enforcement source told CNN the suspect's father had recently bought him a .45-caliber gun for his 21st birthday in April.

But Roof's grandfather says it was just "birthday money" and that the family didn't know what Roof did with that money.

Police are searching for more information about Roof, and they are trying to determine whether he had any links to hate groups.

Authorities released a mug shot of him from Lexington County on Thursday. It was taken after a trespassing arrest in April. According to an arrest warrant from a February incident, Roof had an unlabeled pill bottle with a drug believed to be suboxone, which is used to treat opiate addiction . Roof told police a friend gave him drugs. The status of the cases is unclear.

In an image tweeted by the Berkeley County, South Carolina, government, Roof is wearing a jacket with what appear to be the flags of apartheid-era South Africa and nearby Rhodesia, a former British colony that was ruled by a white minority until it became independent in 1980 and changed its name to Zimbabwe.

The victims

Charleston County Coroner Rae Wooten identified the nine victims as follows: Cynthia Hurd, 54; Susie Jackson, 87; Ethel Lance, 70; Rev. DePayne Middleton-Doctor, 49; Hon. Rev. Clementa Pinckney, 41; Tywanza Sanders, 26; Rev. Daniel Simmons Sr., 74; Rev. Sharonda Singleton, 45; Myra Thompson, 59.

Wooten told reporters that the victims all suffered gunshot wounds and died as a result of them.

Three people survived the shooting, including a woman who received a chilling message from the shooter.

"Her life was spared, and (she was) told, 'I'm not going to kill you, I'm going to spare you, so you can tell them what happened,' " Charleston NAACP President Dot Scott told CNN. She said she heard this from the victim's family members.

Federal authorities have opened a hate crime investigation into the shooting at the oldest AME church in the South, the Department of Justice said.

JUST WATCHED Mayor: Only motive to kill during church prayer is hate Replay More Videos ... MUST WATCH Mayor: Only motive to kill during church prayer is hate 02:05

"The only reason someone would walk into a church and shoot people that were praying is hate," Charleston Mayor Riley said.

It was not clear if the gunman targeted any individual.

"We don't know if anybody was targeted other than the church itself," Charleston police Chief Greg Mullen said.

The church

Emanuel African Methodist Episcopal Church has been a presence in Charleston since 1816, when African-American members of Charleston's Methodist Episcopal Church formed their own congregation after a dispute over burial grounds. Known as "Mother Emanuel," it's been the headquarters for civil rights activity over the decades.

It was burned to the ground at one point but was rebuilt. Throughout its history, it overcame obstacle after obstacle -- destroyed by an earthquake, banned by the state. But its church members persevered, making it the largest African-American church in terms of seating space in Charleston today.

"Any death of this sort is a tragedy. Any shooting involving multiple victims is a tragedy. There is something particularly heartbreaking about death happening in a place in which we seek solace, we seek peace," said President Barack Obama.

Call for healing

The killing put the nation's spotlight once again on the Charleston region. Several months ago, Walter Scott, an unarmed black man, was fatally shot in the back by a North Charleston police officer, a killing that was captured on video.

Pinckney, the pastor, backed a bill to make body cameras mandatory for all police officers in South Carolina.

Riley, who's seen Charleston go through ups and downs during his 40 years as mayor, said the city must immediately start the healing process. A community prayer meeting will be held Friday at the College of Charleston, not far from the church, he said.

"We are going to put our arms around that church and that church family."

The church sits in an area of Charleston densely packed with houses of worship and well-preserved old buildings. The streets of the neighborhood are normally filled with tourists.

Charleston, as several church leaders pointed out, is known as the "Holy City" because of its numerous churches and tolerant attitude toward different denominations.

"Like everybody out here, we're sick to our stomachs that this could happen in a church," said Rep. Dave Mack, a friend of the church's pastor.