FBI agents may impersonate journalists while conducting undercover investigations, and an agent who posed as an editor with the Associated Press during a 2007 investigation did not violate agency policies, the Department of Justice Office of the Inspector General found in a report released Thursday.

The conclusion sparked consternation across social media by journalists, civil rights groups and some legal experts, who have argued that the practice – by its very existence – threatens to heighten public mistrust of reporters, damage journalists' credibility and have a chilling effect on sources and whistleblowers who may fear that their contacts in the media are actually undercover agents.

"The Associated Press is deeply disappointed by the Inspector General’s findings, which effectively condone the FBI’s impersonation of an AP journalist in 2007," Associated Press Vice President Paul Colford said in a statement. "Such action compromises the ability of a free press to gather the news safely and effectively and raises serious constitutional concerns."

The inspector general's report acknowledged that the practice calls for "a higher level of approval" by FBI supervisors than was in place in 2007. Policies on impersonating journalists at the time were "less than clear," it found. However, a new interim policy adopted this June – one that permits agents to pose as journalists so long as they get approval from two high-ranking officials and an undercover review committee at headquarters – meets that requirement.

"We believe the new interim policy on undercover activities that involve FBI employees posing as members of the news media is a significant improvement to FBI policies that existed," the inspector general wrote in the 26-page report.

The Associated Press and the American Civil Liberties Union, however, maintain the new measures are insufficient.

"The FBI guidelines adopted in 2016 in response to this incident still permit the FBI to impersonate news organizations and other third parties without their consent in certain cases, and fail to address the host of other dangers associated with FBI hacking," ACLU legislative counsel Neema Singh Guliani sad in a statement.

The review stemmed from a June 2007 investigation into a series of bomb threats sent by email to Timberline High School outside Seattle. The emails sparked repeated evacuations over the course of a week. The culprit, later found to be a 15-year-old student, masked his location by using proxy servers, and local law enforcement ultimately appealed to the FBI for help.

An agent with the FBI's cybercrime task force, posing as an editor for the Associated Press, contacted the suspect by email, eventually sending the teen fake news articles and photographs that hid a trace program: As soon as the boy clicked one of the photos, his location was revealed to agents. He confessed shortly after his arrest, and he pleaded guilty July 18.

It wasn't until seven years later that the FBI's methods were revealed: Christopher Soghoian, an activist and principal technologist at the ACLU, and previously a technologist at the Federal Trade Commission, tweeted a link in October 2014 to internal documents posted to the website of the Electronic Frontier Foundation, which had been obtained through a Freedom of Information Act request in 2011. Buried on pages 61 and 62 were apparent copies of fake Seattle Times news stories the agents were then planning to email.

The Seattle Times broke the story that day. It soon spread nationwide. The Associated Press sent a letter to then-Attorney General Eric Holder, protesting the method. Other newspapers also expressed concern, joined by groups like the Committee to Protect Journalists and the ACLU.

FBI Director James Comey has previously called the practice "lawful and, in a rare case, appropriate:"