CHARLESTON, S.C. (AP) — A white man was arrested Thursday in the slayings of nine people, including the pastor, at a prayer meeting inside a historic black church in downtown Charleston.

Dylann Storm Roof, 21, stayed for nearly an hour inside the church Wednesday night before shooting six females and three males at a prayer meeting, Police Chief Greg Mullen said.

Roof was arrested at a traffic stop Thursday morning in North Carolina, Mullen said.

“Acts like this one have no place in our country,” said Attorney General Loretta Lynch, who announced a Justice Department hate crime investigation. “They have no place in a civilized society.”

The Emanuel African Methodist Episcopal Church’s pastor, state Sen. Clementa Pinckney, was among those killed. Pinckney, 41, was a married father of two who was elected to the state House at 23, making him the youngest member of the House at the time.

“He never had anything bad to say about anybody, even when I thought he should,” State House Minority leader Todd Rutherford told The Associated Press. “He was always out doing work either for his parishioners or his constituents. He touched everybody.”

Roof’s childhood friend, Joey Meek, alerted the FBI after recognizing him in a surveillance camera image that was widely circulated, said Meek’s mother, Kimberly Kozny. Roof had worn the same sweatshirt while playing Xbox videogames in their home recently.

Roof also displayed a Confederate flag on his license plate, she said. State court records show only one pending felony drug case against him, and a past misdemeanor trespassing charge.

“I don’t know what was going through his head,” Kozny said. “He was a really sweet kid. He was quiet. He only had a few friends.”

The shooting evoked painful memories of other attacks on black churches. They were bombed the 1960s, when they served as organizing hubs for the Civil Rights movement. Many were burned by arsons in the 1990s. Others survived shooting sprees.

This particular church, which was founded in 1816, had its own grim history: When a founder, Denmark Vesey, tried to organize a slave revolt in 1822, he was caught, and white landowners burned the church down in revenge. Parishioners worshipped underground until after the Civil War.

This shooting “should be a warning to us all that we do have a problem in our society,” said state Rep. Wendell Gilliard, a Democrat whose district includes the church. “We need action. There’s a race problem in our country. There’s a gun problem in our country. We need to act on them quickly.”

Mullen said names of the victims would be released once families have been notified.

Charleston Mayor Joseph P. Riley Jr. called the shooting “an unfathomable and unspeakable act by somebody filled with hate and with a deranged mind.”

“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,” Riley said. “We are going to put our arms around that church and that church family.”

A few bouquets of flowers tied to a police barricade formed a small but growing memorial Thursday morning a block away from the church.

“Today I feel like it’s 9-11 again,” Bob Dyer, who works in the area, said after leaving an arrangement of yellow flowers wrapped in plastic. “I’m in shock.”

Charleston residents Samuel Ward and Evangeline Simmons stood silently at the barricade with arms around each other. Simmons said she belongs to another AME congregation.

“It’s like it’s just trying to strip away part of your faith,” Simmons said. “But it just makes you stronger.”

In a statement, NAACP President and CEO Cornell William Brooks condemned the shooting.

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

The attack came two months after the fatal shooting of an unarmed black man, Walter Scott, by a white police officer in neighboring North Charleston that sparked major protests and highlighted racial tensions in the area. The officer has been charged with murder, and the shooting prompted South Carolina lawmakers to push through a bill helping all police agencies in the state get body cameras. Pinckney was a sponsor of that bill.

Soon after Wednesday night’s shooting, a group of pastors huddled together praying in a circle across the street.

Community organizer Christopher Cason said he felt certain the shootings were racially motivated.

“I am very tired of people telling me that I don’t have the right to be angry,” Cason said. “I am very angry right now.”

Even before Scott’s shooting in April, Cason said he had been part of a group meeting with police and local leaders to try to shore up relations.

___

Contributors include Meg Kinnard and David Goldman in Charleston, South Carolina; Eric Tucker in Washington and Jacob Jordan in Atlanta.

Copyright 2015 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.