Image copyright AP Image caption Dylann Roof is accused of murdering nine people at the Emanuel Church in Charleston

A white man accused of shooting dead nine black people at a church in Charleston is competent to stand trial, a federal judge in the US state of South Carolina has ruled.

A psychiatric review of 22-year-old Dylann Roof was performed after a request from his defence team.

He is accused of killing the nine parishioners during their Bible study class in June 2015.

A jury selection for a federal trial is due to resume on Monday.

US District Judge Richard Gergel made the ruling after a two-day hearing behind closed doors earlier this week.

He sealed his reasons for finding Dylann Roof competent, saying that information could keep him from having a fair trial.

The suspect faces 33 federal charges including hate crime. 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.

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

The church where the killings took place is a nationally known historic black church, and federal prosecutors claim the killings were racially motivated.

After the shootings, photos emerged online of Dylann Roof holding the Confederate battle flag, sparking a backlash against the emblem, which to many is a symbol of slavery.