A new report from the Justice Department’s inspector general concludes that FBI agents can go undercover and impersonate journalists, as long as they sufficiently consult FBI headquarters.

The inspector general’s office investigated a case from 2007 where undercover FBI agents impersonated a journalist from the Associated Press. FBI regulations at the time “did not prohibit agents from impersonating journalists or from posing as a member of a news organization,” the report concluded.

And such tactics would still be permissible today under new guidelines issued in 2016, the report said, as long as agents sought various high-level approvals.

In 2007, a high school student at Timberline High School near Seattle used proxy internet servers to conceal his identity while emailing repeated bomb threats to his school. Unable to identify the sender, Seattle police asked the FBI’s Northwest Cybercrime Task Force for help.

FBI agents hatched a plan: An undercover agent sent the student email impersonating an editor for the Associated Press. The email included links to a fake news site designed to look like the Seattle Times, and when the sender clicked on them, the links installed location-revealing malware on the student’s computer.

According to the account in the inspector general’s report, agents did not disclose to their higher-ups that they intended to pose as journalists. After the arrest, the supervisory special agent in charge of the case sent an “urgent report” addressed to then-FBI Director Robert Mueller, but according to the inspector general, “the report did not describe the tactic of impersonating a journalist.”

The tactic came to light in 2014, based on FBI documents obtained by the Electronic Frontier Foundation. It generated an outcry from journalists who argued that having government agents pose as reporters undermined the credibility of journalists looking to protect their sources.

FBI Director James Comey defended the practice in a letter to the editor of the New York Times, saying, “we do use deception at times to catch crooks, but we are acting responsibly and legally.” Comey also said that the FBI actions followed the FBI “guidelines at the time.”

But major news organizations disagreed.

The Reporters Committee for Freedom of the Press, along with 25 other news organizations, sent a letter to Comey calling the impersonation “inexcusable,” and charging the FBI with violating its own guidelines about when an agent can go undercover.

The Reporters Committee and the Associated Press later sued for any documents outlining the FBI’s guidelines for impersonating reporters, and obtained one redacted memo that admitted the agents violated their own guidelines. Then it concluded that “the FBI’s failure to observe its own guidelines was not unreasonable.”

In June 2016, the FBI issued new interim guidelines to regulate undercover impersonation of journalists. The new policy “prohibits FBI employees from engaging in undercover activity in which they represent, pose, or claim to be members of the news media, unless the activity is authorized as part of an undercover operation,” the report explained. Approval is required from the head of the FBI field office, the Undercover Review Committee at headquarters, and the deputy director of the FBI, after consultation with the deputy attorney general.

The Reporters Committee made clear on Thursday that they strongly objected to such a permissive policy.

“Such a policy can seriously damage both the public’s trust in its free press and the ability of journalists to hold government accountable,” said Dan Boardman, chairman of the steering committee for the Reporters Committee, in a statement. “We urge the Justice Department to take seriously the need for reform and the importance of protecting the integrity of the newsgathering process.”

Top photo: A view of the J. Edgar Hoover Building.