The man accused of shooting dead nine black people last month at a church in Charleston, South Carolina, has been indicted on dozens of federal charges that could result in the death penalty, US Attorney General Loretta Lynch said.

Lynch announced on Wednesday that 21-year-old Dylann Roof is facing 33 charges, including hate crimes, firearms violations and obstructing the practice of religion.

The charges have been expected since Roof was arrested following the June 17 shootings at Emanuel African Methodist Episcopal Church in downtown Charleston.

Is Dylann Roof a loner or a white supremacist?

Roof, who is white, appeared in photos waving Confederate flags, and survivors told police that he hurled racial insults during the attack.

Prosecutors have not said whether they will seek the death penalty against the suspect.

Roof already faces state charges, including nine counts of murder.

Hate crimes are often challenging for the government because it must prove that the defendant was primarily motivated by a victim's race or religion, as opposed to other factors frequently invoked up the defence attorneys, such as drug addiction and mental illness.

South Carolina has no hate crime laws on its books, but the murder charges it is pressing against Roof carry the possibility of the death penalty.

The massacre shocked Americans, occurring as it did in one of the oldest and most famous African-American churches in the South, in a city that was once the American hub of the transatlantic slave trade and, in 1861, the starting point of the Civil War.

It also rekindled vigorous opposition to the Confederate battle flag, with lawmakers voting earlier this month to no longer fly the controversial saltire outside the South Carolina legislature.

"Roof conceived his goal of increasing racial tensions and seeking retribution for perceived wrongs that he believed African Americans have committed against white people," Lynch said.

"To carry out these twin goals of fanning racial flames and exacting revenge, Roof further decided to seek out and murder African Americans because of their race," added the attorney general, who is African American herself.

Source: Agencies