The suspect in a mass shooting at a South Carolina church has been taken into custody in Shelby, North Carolina.

U.S. Attorney General Loretta Lynch confirmed the arrest this morning. 

Dylann Roof, 21, a resident of South Carolina, was identified earlier this morning as the suspected shooter. 

Nine people were killed in the attack last night on Emanuel African Methodist Episcopal Church, a historically black church.

President Obama spoke from the White House, lamenting that Roof was able to easily obtain a gun.

“I’ve had to make statements like this too many times,” he said. “Communities like this have had to endure tragedies like this too many times. We don’t have all the facts, but we do know that once again, innocent people were killed, in part, because someone who wanted to inflict harm had no trouble getting their hands on a gun.”

While Obama noted that now is a time for mourning and healing, he said that America must eventually “reckon with the fact that this type of mass violence does not happen in other advanced countries.”

Roof's uncle said he recognized his nephew in a police photo and notified authorities.

He said Roof had been given a .45 caliber handgun by his father on his 21st birthday in April.

Charleston Police Chief Gregory Mullen said the suspect was stopped after a citizen alerted law enforcement to suspicious activity. Mullen said that Roof was cooperative.

The police chief said authorities believe that Roof acted alone. Roof was in possession of a gun when he was arrested.

Footage that aired moments ago on Fox News shows the car Roof was driving. Shelby is about 250 miles away from Charleston.

Charleston Mayor Joseph Riley called the suspected gunman an awful and terrible human being and said he “is now in custody where he will always remain.”

“The arrest of this awful man is an important part for all of us in this community and in our country to begin the necessary process of our healing together,” he said.

Riley said President Barack Obama personally called him to convey his sympathy and offer to make federal resources available. Riley also received a phone call from Vice President Joe Biden, who knew slain pastor Clementa Pinckney. 

Pinckney, the church's pastor and a state senator, was one of nine people killed in the attack. Two other men and six women were also murdered.

One woman reportedly fled after Roof told her to tell others about the attack. A 5-year-old survived the attack after being instructed to play dead, according to reports.

Surveillance photos appear to show Roof entering the Emanuel African Methodist Episcopal Church in downtown Charleston last night. 

Roof is said to have sat in the Wednesday night prayer service for an hour before opening fire.

Authorities have referred to the shooting as a hate crime.

The mug shot above reportedly came from Roof's arrest on a drug charge earlier this year.

Both arrests reportedly occurred at Columbiana Centre mall in Columbia, S.C.

In February, Roof was taken into custody after police received a call about someone dressed in black and acting strangely. 

Roof was found in possession of Suboxone, a powerful drug used to treat opiate addiction.

He was then arrested again a few months later on a trespassing charge after being banned from entering the mall.