U.S. authorities said they would pursue federal hate crime charges after the man allegedly behind Wednesday night's fatal mass shooting at a historic African-American church in Charleston, South Carolina, was arrested.

The Federal Bureau of Investigation identified Dylann Storm Roof, 21, of Lexington, S.C., as their suspect.

Suspect Arrested in Church Shooting, US Authorities Vow Justice

Roof was stopped in a car in North Carolina Thursday afternoon and taken into custody in Shelby, North Carolina, about 400 kilometers from the church. The suspect was flown back to South Carolina in the evening, in the custody of the FBI.

Suspect Arrested in Church Shooting, US Authorities Vow Justice

Carson Cowles, the suspect’s uncle, told Reuters that he recognized Roof in a photo released by police, and described him as quiet and soft-spoken. Roof's father gave Dylann Roof a .45-caliber pistol for his 21st birthday in April, Cowles added.

Suspect Arrested in Church Shooting, US Authorities Vow Justice

Charleston Chief Mullen said at a news conference earlier Thursday that the gunman, described as a white male in his early to mid-20s, walked into the church during a weekly prayer meeting and sat with the churchgoers for about an hour before he opened fire, killing nine people.

Several others were wounded in the massacre, Mullen said.

to the press, President Barack Obama said he and his wife, Michelle, personally know several members of the church, including the pastor who was murdered.

“To say our thoughts and prayers are with them and their families and community doesn’t say enough to communicate the heartache, sadness and anger that we feel,” Obama said.

The president condemned the killings as "senseless."

Sorry, but your browser cannot support embedded video of this type, you can to view it offline.

Obama noted Emanuel African Methodist's long involvement in the nation's civil rights movement.

"Mother Emmanuel is in fact more than a church," he said. "This was a place of worship founded by African-Americans seeking liberty."

He said Americans must come to terms with increasing gun violence in the nation.

"Now is the time for mourning and for healing, but let's be clear — at some point, we as a country will have to reckon with the fact that this type of mass violence does not happen in other advanced countries," he said.

Wednesday's incident was at least the 11th time the president has publicly addressed the country following a mass shooting, a review of White House records shows.

The U.S. Justice Department said earlier Thursday it had opened a federal hate crime investigation into the shooting.

The hate crime investigation involves the Justice Department's Civil Rights Division, the FBI and the U.S. Attorney's Office in South Carolina.

“This is a crime that has reached into the heart of that community ... acts like this have no place in our country," U.S. Attorney General Loretta Lynch said.

Sorry, but your browser cannot support embedded video of this type, you can to view it offline.

Three men and six women were killed in the church. Clementa Pinckney, the senior pastor and a South Carolina state senator, was killed in the rampage.

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

State House Minority leader Todd Rutherford told The Associated Press Pinckney “never had anything bad to say about anybody, even when I thought he should."

“He was always out doing work either for his parishioners or his constituents. He touched everybody," Rutherford said.

Pinckney, 41, was a married father of two who was elected to the statehouse at age 23, making him its youngest member at the time.

Choking back tears, South Carolina Governor Nikki Haley asked for prayers for the victims' families.

"We woke up today, and the heart and soul of South Carolina was broken. And so we have some grieving to do and we've got some pain we have to go through. Parents are having to explain to their kids how they can go to church and feel safe, and that's not something we ever thought we had to deal with," she said.

Charleston Mayor Joseph Riley called the assault "a most unspeakable and heartbreaking tragedy."

“The only reason that someone could walk into a church and shoot people praying is out of hate,” Riley said. “It is the most dastardly act that one could possibly imagine, and we will bring that person to justice. ... This is one hateful person.”

Riley pledged the Charleston community would "put our arms around that church and that church family."

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