The friend of the white man charged in the killings of nine black churchgoers in Charleston, South Carolina, pleaded guilty to lying to federal investigators about what he knew prior to the massacre.

Joey Meeks, 21, agreed to the plea deal - which included failure to report a crime - and now faces up to eight years in prison. Prosecutors say if he is helpful in their case against the alleged gunman, Dylann Roof, he could receive a shorter sentence.

The Associated Press says that Mr Meeks admitted that Mr Roof had planned on carrying out the shooting at the Emanuel African Methodist Episcopal (AME) church on 17 June 2015 for more than six months. He also told authorities that Mr Roof intended to start a “race war” with the shooting.

Mr Meek had previously told the AP that Mr Roof complained during a drunken rant that “blacks were taking over the world” and “someone needed to do something about it for the white race.”

Mr Roof is charged with nine counts of murder in state court and hate crimes in federal court.

After Mr Roof killed the nine members of the Emanuel AME church, including South Carolina state senator Clementa C Pinckney. Their deaths brought issues of race and racialised violence to the forefront of American consciousness.