The man arrested after fatally shooting nine people at an African-American church in Charleston, South Carolina, was charged with nine counts of murder, police said.
Dylann Roof, 21, also faces a weapons possession charge and is expected to appear in court later on Friday for a bail hearing.
Apprehended on Thursday in the neighbouring state of North Carolina, Roof has confessed to police, US media outlets reported, citing law enforcement officials.
The shooting occurred around 9 p.m. on Wednesday, an hour after the suspect entered Charleston’s Emanuel African Methodist Episcopal Church during Bible study.
The suspect killed all but three of the 12 other people who were in the church with him at the time of the attack.
Among the three men and six women slain was the church’s senior pastor, state Senator Clementa Pinckney, while one of the survivors said that the shooter told her he was sparing her life so she could “tell everybody what happened”.
The Rev. Pinckney’s cousin, Sylvia Johnson, told NBC News that one survivor reported the shooter as saying: “I have to do it. You rape our women and you’re taking over our country. And you have to go.”
Roof’s friends and acquaintances have reached out to the media to say that while he spoke of wanting to start a race war and the need to re-institute racial segregation, they never thought he would resort to violence.
One of the photos on Roof’s Facebook page shows him wearing a jacket with patches representing the flags of apartheid South Africa and the former Rhodesia, ruled by a white minority government until the territory formally became independent from Britain in 1980 as Zimbabwe.
A source familiar with the investigation told NBC News that Roof said during questioning that the friendly reception he got from the group at Emanuel made him reconsider his plan.
Roof “almost didn’t go through with it because everyone was so nice to him,” but finally decided to “go through with his mission,” the source said.
Emanuel AME, founded in 1816, has played a historic role in the life of Charleston’s black community.
While the massacre has been labelled a hate crime by Charleston’s mayor and police chief and South Carolina Governor Nikki Haley, the state does not have a hate crimes statute.
US Attorney General Loretta Lynch announced on Thursday that the FBI and Justice Department had opened an investigation with an eye to charging Roof under the federal hate crimes law.
“This is an absolute hate crime,” the Republican governor said on NBC’s “Today” show. “We’ve been talking with the investigators because we’ve been going through the interviews, they said they looked pure evil in the eye.”
At the same time, Haley said she wants Roof to be tried on the state murder charges.
“We will absolutely want him to have the death penalty. This is the worst hate that I’ve seen and the country has seen in a long time,” she said.
South Carolina’s most recent execution was in 2011.