Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

The 21-year-old white man suspected of having gunned down nine people at a historic black church in South Carolina, was back in Charleston Thursday after a sweeping manhunt that spanned two states.

Dylann Roof was caught after 11 a.m. ET following Wednesday night's massacre at Emanuel African Methodist Episcopal Church. He was arrested about 245 miles north in Shelby, North Carolina, during a traffic stop, Charleston Police Chief Gregory Mullen said at a news conference.

Shelby police received a tip about a suspicious car in the area and arrested Roof without incident, Mullen added.

"I am so pleased that we were able to resolve this case quickly ... so that nobody else is harmed by this individual who obviously committed a tragic, heinous crime in the city of Charleston," Mullen said.

RELATED: Tributes Paid to 'Kind-Hearted' Victims

Local and state police, joined by federal agents, moved quickly to identify the suspect and track him down.

"In America, we don't let bad people like this get away with these dastardly deeds," Charleston Mayor Joe Riley Jr. told reporters.

South Carolina authorities went to North Carolina to bring Roof, who waived extradition in his initial court appearance, back to Charleston to face charges. By Thursday evening he was in transit and he was in the Charleston County Detention Center at 7:45 p.m., officials said.

Dylann Roof in his booking photo Thursday. CHARLESTON COUNTY, SOUTH CAROLINA, SHERIFF

Before Roof's capture, chilling details emerged about the attack. The gunman went to the church and asked for the pastor, the Rev. Clementa C. Pinckney, and sat among congregants during a Bible study meeting, a survivor later told one of Pinckney's cousins.

He then opened fire on the gathering.

"At the conclusion of the Bible study, from what I understand, they just start hearing loud noises ringing out," cousin Sylvia Johnson told NBC station WIS of Columbia, "and he had already wounded — the suspect already wounded a couple of individuals."

She said one of those people was Pinckney, a 41-year-old married father of two and Democratic member of the state Senate.

The female survivor told Johnson that the gunman reloaded five different times and that her son was trying to "talk him out of doing the act of killing people."

The Morning Rundown Get a head start on the morning's top stories. This site is protected by recaptcha

But he wouldn't listen, she said.

"You rape our women, and you're taking over our country. And you have to go," the shooter told the group, according to the survivor's account to Johnson.

Dylann Roof, 21, of Columbia, South Carolina, in a photo from his Facebook page. Berkeley County Government via EPA

PHOTOS: South Carolina in Shock After Worshippers Shot Dead at Historic Church

Charleston police received the first 911 calls about 9:05 p.m. ET. Authorities say three people survived the massacre, while six women and three men were killed. Sources told NBC News that Pinckney was among the dead.

The county coroner identified the other victims as:

Tywanza Sanders, 26, a 2014 graduate of Allen University in Columbia, which Pinckney also attended.

Cynthia Hurd, 54, manager of St. Andrews Regional Library.

The Rev. Sharonda Coleman-Singleton, 45, an assistant pastor at the church and girls track coach at Goose Creek High School.

Susie Jackson, 87, a longtime church member.

Ethel Lance, 70, a sexton at the church.

The Rev. Depayne Middleton Doctor, 49, a church singer and former Charleston County community development employee.

The Rev. Daniel Simmons Sr., 74, a member of the church's ministerial staff, who died in the operating room at the hospital.

Myra Thompson, 59, wife of the vicar of Holy Trinity Reformed Episcopal Church.

Early Thursday, authorities released images of Roof, who had fled in a black sedan, and vowed to apprehend him while a rattled community tried to understand why someone would open fire at Emanuel AME. The church is one of the nation's oldest African-American houses of worship, organized in 1816.

"We woke up today and the heart and soul of South Carolina is broken," a choked-up Gov. Nikki Haley said after Roof's arrest. "So we have some grieving to do, and we have some pain we have to go through. Parents are having to explain to their kids that they can go to church and feel safe — and that's not something we've had to deal with."

RELATED: All You Need to Know About Hate in America

Police records in Columbia, the state capital, show that Roof also faces charges of narcotics possession in neighboring Lexington County after he was arrested in a Feb. 28 incident at a mall. An incident report said he had unprescribed suboxone, a Schedule 3 narcotic used to treat opiate addictions.

Roof was banned from the mall for a year, but in April, he was charged with trespassing after he was found in the same mall's parking lot, Columbia police said. He was banned from the mall for three more years.

Charleston officials said the FBI and the federal Bureau of Alcohol, Tobacco, Firearms and Explosives were helping with the investigation, which is being categorized as a hate crime. The Justice Department is also opening a parallel hate crime review into the case.

"Even as we struggle to comprehend this heartbreaking event, I want everyone in Charleston and everyone affected by this tragedy that we will do everything in our power to heal this community and make it whole again," U.S. Attorney Gen. Loretta Lynch told reporters.

Rep. James Clyburn, D-S.C., one of Congress' prominent black politicians, denounced the attack in his home state.

"I am distraught that this kind of hate still exists in our country," he said in a statement, adding, "We must take these horrific crimes that are happening across our states and teach our neighbors that hate is not the answer."

RELATED: Obama: Church Shooting 'Raises Questions About a Dark Part of Our History'

Officials in Charleston said the community takes pride in the historic houses of worship and the nickname of "The Holy City" — for the numerous church spires that make up the skyline.

"In Charleston, to have a horrible, hateful person go into a church and kill people there to pray and worship with each other is something that is beyond incomprehensible and is not explained," Mayor Riley said.

The Rev. Clementa C. Pinckney South Carolina Senate Democratic Caucus

Anton Gunn, a former state representative who was friends with Pinckney, told NBC News on Thursday that was "afraid to go outside" while the gunman remained on the loose.

"Is he targeting other black people?" Gunn asked.

RELATED: Charleston Church Shooting: Social Media Reaction to Attack

Pastor John Paul Brown of the city's Mount Zion AME Church, who prayed with the Pinckney family Wednesday, remembered the slain pastor as a youth leader who began helping with Sunday school when he was only 7 or 8.

He wanted the suspect brought to justice alive.

"He needs to be dealt with. We need answers and people need closure," Brown said. "And if he was deranged, we need to know what was he doing with a gun."

Tory Fields, an associate minister at the Charleston County Ministers Conference, said the community desperately wants to know why someone would use a gun on a group of people armed with nothing more than Bibles.

"What we hear now is that there was a Caucasian white man who walked into an African-American church and opened fire while people were praying, having Bible study," Fields said. "That's unacceptable. That's unacceptable.

"We've been praying for a long time, we've been on our knees for a long time," Fields added. "But now it's time to stand up."