SEATTLE — The FBI’s creation of a fake news story and impersonation of an Associated Press reporter during a criminal investigation undermine media credibility, blur the lines between law enforcement and the press and raise questions about whether the agency followed its own guidelines, free press advocates say. In a letter to The New York Times on Thursday, FBI Director James Comey said an agent “portrayed himself as an employee of The Associated Press” in 2007 to help catch a 15-year-old suspect accused of making bomb threats at a high school near Olympia, Washington. It was publicized last week that the FBI forged an AP story during its investigation, but Comey’s letter revealed the agency went further and had an agent pretend to be a reporter for the wire service.

Comey said the agent posing as an AP reporter asked the suspect to review a fake article about threats and cyberattacks directed at the school

The bogus article contained a software tool that could verify Internet addresses. The suspect clicked on a link, revealing his computer’s location and Internet address, which helped agents confirm his identity.