CHARLESTON, S.C. (WCBD) — U.S. District Judge Richard Gergel has accepted a guilty plea of the friend of the man accused of gunning down nine parishioners during a Bible study in downtown Charleston.

Under a plea agreement signed by 21-year-old Joey Meek and federal prosecutors, Meek plead guilty to lying to authorities and failing to report a crime.

In court on Friday, April 29, Meek told Judge Gergel that Dylan Roof conveyed his plan a week before the deadly shooting took place. We also learned from Meek’s testimony that Roof scouted out Emanuel AME Church for about six months. On Wednesday, June 17, the night of the shooting, Meek also said he told other friends but asked those friends not to tell investigators.

Copy of the statement from Joey Meek’s attorney.

News 2 investigator Rebecca Collett was in court and said family and survivors filled three rows. The son of one victim, Gary Washington, address the court through an interpreter and said he has been miserable without his mom.

Meek will remain on bond until sentencing. The sentencing is scheduled for a later date.

The 22-year-old Roof, is charged with hate crimes and other charges in federal court. He also faces nine counts of murder in state court in a death-penalty trial set for next January.