FBI headquarters in Washington. (AP Photo/Manuel Balce Ceneta, File)

A new Justice Department inspector general’s report giving the FBI a pass on its impersonation of a journalist hit home. Law enforcement officials apparently don’t realize how dangerous a masquerade can be.

Last week’s report says the FBI did not violate the weak policies in effect when an agent pretended to be an Associated Press editor to catch a 2007 serial intimidator who made bomb threats by email. The FBI recently issued tougher, interim requirements for agents posing as journalists.

For journalists, that’s not good enough.

Impersonation of journalists by law enforcement or intelligence officers can be perilous — for the journalists.

This helps explain:

For a 1986 Wall Street Journal article on life under apartheid, I lived with a family in a shanty section of Port Elizabeth, an industrial seaport on the Indian Ocean. The all-black shack town was named Soweto, sometimes called Soweto by the Sea, to distinguish it from the much larger township in Johannesburg.

I was in a shebeen, one of the unlicensed beer joints the racist regime allowed to exist. I had been in Soweto for some time, and word spread about a black American in the township. Being an American in South Africa at that time was ample cause for curiosity and suspicion among those fighting for freedom and democracy.  After all, then-President Reagan had aligned the United States with the racist government that violently and systematically repressed the majority black population.

My absorption of shebeen culture was interrupted when three young men confronted me, asking me to step outside. At that time in the black townships, there were informal gangs, kind of like self-appointed vigilantes, known as Mabuto.  They took it upon themselves to bring their brand of justice to those thought to be spies for the system. Sometimes that justice was a “necklace,” a flaming tire around someone’s neck.

Once outside in the no-streetlight night, one of the Mabuto informed me that “people are saying you are with the CIA.”

Not good. Also, not true.

I talked my way out of it by explaining how black Americans felt about Reagan.

That experience demonstrated the grave risks that can grow from situations that allow people to confuse intelligence or law enforcement officials with journalists. Like those officials, journalists go into dangerous environments, investigate controversial and illegal doings, and question unsavory characters. Being mistaken for an officer, while not having the same resources for protection — a gun and backup assistance, for example — can be hazardous to a reporter’s life.

In the 2007 case, an agent pretended to be a journalist to catch a teenager who had phoned in bomb threats to a high school in Lacey, Wash., south of Seattle. An FBI behavioral analysis determined that the 15-year-old “appeared to be very narcissistic and was feeding off the attention he was receiving as a result of the bomb threats,” according to the report.

But they didn’t know who was sending the emails through proxy servers to shield his location.

The FBI decided to play on the kid’s narcissism by sending him an email from the make-believe editor. The email included an attachment with a fake news story and pictures. When the link to the photos was clicked, it activated a computer program that revealed the teenager’s location. He was caught.

It was an ingenious ploy that worked. But the cost was clouding a crucial and needed distinction between law enforcement and journalism.

After the FBI’s charade was exposed in 2014, the Reporters Committee for Freedom of the Press protested in a letter to the Justice Department and the FBI on behalf of more than two dozen journalism organizations, including The Washington Post. It said “the utilization of news media as a cover for delivery of electronic surveillance software … endangers the media’s credibility and creates the appearance that it is not independent of the government.”

On Thursday, the day the study was released, AP Vice President Paul Colford said impersonation “compromises the ability of a free press to gather the news safely and effectively and raises serious constitutional concerns.”

The FBI adopted “a much more strict interim policy” on impersonating journalists in June, as the study was being finalized, according to the report. But the stricter policy, which requires a series of approvals, falls short, said Bruce Brown, the Reporters Committee executive director.

Inspector General Michael Horowitz called the new policy “a significant improvement.” True, but he should have pushed for a ban on journalistic impersonation.

Any policy regulating impersonation of journalists should do so “more aggressively than this one does,” Brown said. A more aggressive policy, he added, would require the attorney general to approve the deception and inform the news organization affected, at least after its name had been used.

But even a more aggressive policy would be second best to no ruse.

Brown was emphatic: “We never want to see impersonation.”