Image copyright Pool Image caption Family members of Dylann Roof's victims told him that they had forgiven him shortly after his arrest

A white man accused of killing nine black people at a South Carolina church will be allowed to represent himself at trial, a federal judge has said.

US District Judge Richard Gergel said 22-year-old Dylann Roof's wish to be his own lawyer was "unwise", but nevertheless granted his request.

The surprise development came just as jury selection was set to begin.

Last week Mr Roof was deemed competent to stand trial in the shooting of nine Charleston parishioners in June 2015.

Image caption The victims, clockwise from top left: Cynthia Hurd, Clementa Pinckney, Sharonda Coleman-Singleton, Tywanza Sanders, Ethel Lance, Depayne Middleton-Doctor, Susie Jackson, Daniel Simmons Sr

Wearing a grey jail-issue jumpsuit, he was sitting on Monday morning at his defence table after his lawyers moved to the side.

Judge Gergel told the court: "I do find defendant has the personal capacity to self-representation."

Addressing Mr Roof, he said: "I continue to believe it is strategically unwise (to represent yourself), but it is a decision you have the right to make."

Mr Roof smiled slightly and replied quietly: "yes, sir."

Acting as his own lawyer, Mr Roof could end up questioning family members of the victims and survivors in court.

His decision to represent himself comes months after he offered to plead guilty if prosecutors took the death penalty off the table.

From Monday, 516 potential jurors will be questioned individually by the judge; 12 will ultimately be selected to decide his fate.

As the judge began questioning potential jurors - the first 10 of whom were white - Mr Roof did not ask questions or make any objections.

Serial killer Ted Bundy, Washington-area sniper John Allen Muhammed and Fort Hood attacker Nidal Hasan also acted as their own lawyers, but ended up with death sentences.

Mr Roof faces 33 federal charges, including a hate crime count.

He has already been found competent in a state court, where he faces nine counts of murder, and prosecutors say they will seek the death penalty.

One juror was struck from the final panel by the judge after expressing reluctance to enforce the death penalty.

"You are playing little bit of God in there. That's what makes me hesitant," the female juror told Judge Gergel.

The judge also dismissed a male juror after he said he believed that all murderers should receive the death penalty if they are deemed sane to stand trial, the Post and Courier reported.

Federal prosecutors claim the mass shooting on a Bible study class at Emanuel African Methodist Episcopal Church in Charleston was racially motivated.

Mr Roof allegedly spared three people in the attack so they could tell authorities the shootings were because he hated black people.

Photos emerged online in the aftermath of Mr Roof holding the Confederate battle flag, sparking a backlash against the emblem, which critics see as a symbol of slavery.