A federal judge on Thursday ordered a psychiatric examination for Dylann Roof, days before he is to represent himself as prosecutors make the case that he should be executed for the June 2015 massacre at a Charleston, South Carolina, church.

U.S. District Judge Richard Gergel said in an order he was requesting the evaluation and would hold a second competency hearing "in an abundance of caution" after Roof's standby lawyers filed a motion about his mental fitness to stand trial.

The motion was sealed, but Gergel said defence lawyers stated it was spurred by facts developed since the judge found Roof competent after a hearing held in November ahead of the guilt phase of his trial.

Defence lawyer David Bruck, who filed the motion, and the lead prosecutor did not comment on the latest developments in the case.

Jurors on Dec. 15 found Roof, a 22-year-old avowed white supremacist, guilty of 33 counts of federal hate crimes resulting in death, obstruction of religion and firearms violations stemming from the shooting deaths of nine people attending a Bible study at a historic black church.