FBI Director James Comey revealed in a letter Thursday that an agent posed as a reporter from The Associated Press, or AP, to confirm the identity of a suspect during a 2007 criminal investigation. Such an action could have ruined the news organization’s credibility, AP wrote in a report.

Comey reportedly wrote in the letter, sent to The New York Times, that the FBI agent portrayed himself as a journalist to track a 15-year-old suspect accused of threatening to bomb a high school near Olympia, Washington. Comey reportedly wrote that the agent had asked the suspect to review an article about cyberattacks and bomb threats directed at the school, “to be sure that the anonymous suspect was portrayed fairly." The fake AP article contained a link that, once clicked, installed software that allowed the FBI to identify the suspect's location and verify an Internet address. This would help the FBI to confirm the identity of the suspect.

"That technique was proper and appropriate under Justice Department and FBI guidelines at the time. Today, the use of such an unusual technique would probably require higher-level approvals than in 2007, but it would still be lawful and, in a rare case, appropriate," Comey wrote, adding that all undercover operations involve deception in some form, and that it “has long been a critical tool in fighting crime,” AP reported.

"This latest revelation of how the FBI misappropriated the trusted name of The Associated Press doubles our concern and outrage, expressed earlier to Attorney General Eric Holder, about how the agency's unacceptable tactics undermine AP and the vital distinction between the government and the press," Kathleen Carroll, executive editor of the AP, said, and called the FBI’s actions “unacceptable.”

The AP sent a letter to Holder last week asking him to provide details on every time the Department of Justice, or DOJ, had posed as a media organization to conduct an investigation. It also reportedly called for policies to prevent impersonations of the news organization in the future.

The Reporters Committee for Freedom of the Press also wrote a letter on Thursday to Comey and Holder asking for details about the incident.

"The utilization of news media as a cover for delivery of electronic surveillance software is unacceptable," the letter reportedly said. "This practice endangers the media's credibility and creates the appearance that it is not independent of the government. It undermines media organizations' ability to independently report on law enforcement."