Federal authorities have told a friend of the man accused of fatally shooting nine black parishioners in a Charleston church that he's under investigation, a step one legal expert says often serves as a warning that charges are imminent and legal counsel is advised.

Joey Meek, 21, of Lexington, South Carolina, was notified by a so-called target letter earlier this month that he is under investigation for lying to police and for knowing about a crime before or after it was committed but failing to report it, a federal law enforcement official told The Associated Press.

The official was not authorized to speak publicly about the investigation and requested anonymity. The disclosure was first reported by The State newspaper.

Meek told the AP that Dylann Roof occasionally stayed with him at a mobile home in Red Bank, about 20 miles from Columbia, before the June 17 shootings at Emanuel African Methodist Episcopal Church. Meek said he and Roof were school friends but went their separate ways. Then, just weeks before the shooting, Roof started coming around again.

Meek also described how Roof, while drunk on vodka, complained that "blacks were taking over the world" and that "someone needed to do something about it for the white race" before he passed out in the yard.

Meek told the AP that Roof said he used birthday money from his parents to buy a .45-caliber Glock semi-automatic handgun, which Meek took away from him the night of his rant but gave back to him when Roof had sobered up.

Meek also said he called authorities after recognizing Roof from surveillance footage from the church. But, according to the federal official, authorities believe Meek was dishonest with them during their investigation.

Federal officials can keep investigations secret until someone is charged, or they can opt to let subjects know they are under investigation -- as they did with Meek -- in hopes that the subject will get an attorney, according to Rene Josey, a former U.S. Attorney now in private practice in South Carolina.

If that happens, and a person already has a lawyer, Josey said, the legal process can ultimately run more smoothly in the event that charges are brought.

"You serve a target letter on them, it's not that formal, but it serves a purpose in advancing the investigation somehow, either through fairness or cooperation or both," he said.

Meek is currently on probation, having pleaded guilty earlier this year to possessing a stolen vehicle, according to Lexington County court records. Lindsey Fry, Meek's girlfriend, told the AP on Wednesday that Meek has a good job repairing air conditioners, fears going to jail and has been trying to get an attorney since receiving the letter.

"He's got a good job now," Fry said during an interview at the mobile home she shares with Meek. "He's paying probation. We're supposed to move soon. We're trying to save money for a car. But now we have to do this."

Fry, 19, said she and one of Meek's brothers testified before a grand jury, answering questions about what Meek did after finding out about the shootings and about Roof's activities.

Fry said she thought she appeared before the grand jury after Roof's late July indictment on federal hate crime charges but couldn't remember the exact date of her testimony. No other family or friends who spent extensive time with Roof at the mobile home have received target letters, Fry said.

"He's really worried," Fry said, of Meek. "He knows he didn't do anything wrong. But when you're innocent, it can be really hard to prove you are innocent."

The disclosure came as a judge overseeing the state case against Roof said he would modify his order blocking the release to the news media of emergency calls, witness statements and other documents stemming from the investigation into the slayings.

During a hearing Roof did not attend, Circuit Judge J.C. Nicholson said some information ultimately could be released by authorities but expressed concern that the victims' families would be traumatized again with the release of graphic crime scene photographs and audio tapes of the 911 calls.

Attorneys for various news organizations, including the AP, and the victims' families agreed to meet with Nicholson behind closed doors to review the material and decide what should be released.

During the hearing, an attorney for Roof said his client wants to plead guilty to the murder and other charges against him in exchange for a life prison sentence without parole. State prosecutors have said they will pursue the death penalty at trial.

At a July hearing in federal court, another attorney for Roof said his client wanted to plead guilty to 33 federal charges, but that he couldn't advise his client to do so until federal prosecutors said whether they were seeking the death penalty.