Charleston shooting suspect Dylann Storm Roof is escorted from the Cleveland County Courthouse in Shelby. Picture: Chuck Burton

Charleston - Dylan Roof, the 21-year-old white man accused of shooting dead nine people in a rampage at a historic black South Carolina church, has confessed to carrying out the attack, CNN reported on Friday, citing unnamed law enforcement officials.

Roof is due to face a bail hearing later on Friday, where he will appear by video link from the Charleston-area detention centre, to which he was brought by police following his arrest in North Carolina, 220 miles north of the nearly 200-year-old Emanuel African Methodist Episcopal Church.

US officials are investigating Roof's attack, in which four ministers were killed including a Democratic state senator, as a hate crime. It comes in a year of turmoil in the United States, where police killings of several unarmed black men has provoked angry national debates about race relations, policing and the criminal justice system.

Roof had intended to set off new racial confrontations with his attack, CNN reported, citing a law enforcement source. The report could not be immediately confirmed.

South Carolina Governor Nikki Haley told NBC's “Today” show on Friday that she would prefer to see Roof tried on state charges and that she believed state prosecutors should pursue a death sentence.