In spring 2007, Timberline High School in Lacey, Wash., received bomb threats by email, on paper and on a bathroom wall, causing the school to be evacuated. A few days later, according to a local news report, a 10th-grade student was arrested.

The incident seemed to have been relegated to a footnote in the history of the North Thurston Public Schools system. But late last month, responding to documents uncovered by the Electronic Frontier Foundation, a public interest group, the F.B.I. said that it caught the young man by emailing him a fake Associated Press article with built-in tracking software. The revelation set off protests by The A.P. and other supporters of the press.

Then, James B. Comey, the director of the F.B.I., in a letter published Friday in The New York Times, defended the practice, and said that an agent had impersonated an A.P. reporter in the email. The disclosure caused further outrage at the news organization.

“The agent knew that The A.P. was a credible organization, or he would not have said ‘I am a reporter for The A.P.,' ” Kathleen Carroll, The A.P.'s executive editor, said in an interview. “And by using that credibility, he tarnished it.”