By AMY ROLPH, SEATTLEPI.COM STAFF

Updated 11:42 am, Thursday, November 15, 2012

The FBI agent who started an investigation into the extramarital affair of CIA head David Petraeus has been named -- and it turns out, he has ties to Seattle.

The New York Times today named agent Frederick W. Humphries, 47, as the man who fielded a complaint from Tampa, Fla., socialite Jill Kelley and inadvertently launched an investigation that would lead to the resignation of Petraeus.

Prior to transferring to Tampa, Humphries worked in the Seattle FBI office. He was reportedly instrumental in uncovering the 1999 millennium bombing plot, when Algerian terrorist Ahmed Ressam entered the U.S. at Port Angeles from Canada as part of a plan to bomb the Los Angeles International Airport.

Humphries became involved in the case at the start because he could speak French, and so did Ressam, who claimed to be a Quebec citizen when he was arrested.

Humphries, unidentified until Wednesday, also became mired in the scandal once investigators discovered he had emailed a photo of himself, shirtless, to Kelley. In Wednesday's report, The New York Times described the photo as non-sexual, saying Humphries was posing with two mannequins.

Humphries lawyer says the agent has done nothing wrong.

Lawrence Berger, the general counsel for the Federal Law Enforcement Officers Association, said in an interview Wednesday that his client, Humphries, did nothing wrong and should not be disciplined. "He's committed no misconduct," Berger said and predicted he would be cleared of any misconduct.

He and Kelley are friends, according to the Associated Press. Nearly all lines in the tangled sex scandal involving Petraeus lead back to Kelley, whose complaint about anonymous, threatening emails triggered the FBI investigation that led to the general's downfall as director of the CIA.

Now Kelley is in the middle of an investigation of Gen. John Allen, the top U.S. commander in Afghanistan, over alleged "inappropriate communications" between the two.

.

The Times reports Humphries has a dogged reputation among colleagues:

In May 2010, after he had moved to the Tampa field office, Mr. Humphries was attacked outside the gate of MacDill Air Force Base by a disturbed knife-wielding man. He fatally shot the man, and the shooting was later ruled to be an appropriate use of force, according to bureau records and colleagues.

Two former law enforcement colleagues said Mr. Humphries was a solid agent with experience in counterterrorism, conservative political views and a reputation for aggressiveness.

"Fred is a passionate kind of guy," said one former colleague. "He's kind of an obsessive type. If he locked his teeth onto something, he'd be a bulldog."

Concerned about the emails, Kelley contacted Humphries in June. The two had met at a 2011 FBI Citizens Academy, a program aimed at teaching the public and journalists about what the agency does and how it operates. Kelley was in the class, which Humphries lectured one night about terrorism, according to Natalie Shepherd, a Tampa TV reporter who was there.

Humphries, a former Army captain who worked in military intelligence, thought the emails raised serious concerns because the anonymous author knew the comings and goings of Allen and Petraeus, a former general who had preceded Allen in Afghanistan. His report back to the FBI started the investigation that led to Broadwell and uncovered her affair with Petraeus.Humphries became involved when Kelley contacted him to report recieving annonymous threatening emails about her interactions with Petraeus. The emails were eventually traced to Paula Broadwell, a biographer who had an affair with the CIA chief.

The Times reported that Humphries passed along Kelley's complaint about the emails to superiors, and then to Rep. Dave Reichert, D-Wash., who moved it up the chain to House majority leader Eric Cantor, and then on to FBI Director Robert Mueller.

Humphries' prior assignment to Seattle apparently explains his contact with Reichert, who was King County sheriff from 1997 to 2004.

(The) report (by a psychiatric expert) points out that FBI case agent Fred Humphries treated Ressam with respect when Ressam was enthusiastically cooperating with the government. Humphries is widely regarded by agents and prosecutors as having done an excellent job of extracting information from Ressam by developing a strong relationship with the Algerian terrorist. Earlier this week, Charlie Mandigo, once special agent in charge of the FBI's Seattle office, recalled that Humphries was promoted and transferred from Seattle about the same time that Ressam started to shut down.

Only a few weeks ago, Ressam was sentenced to 37 years in prison after his original sentence of 22 years was twice overturned on appeal.

Ressam, who had trained with al-Qaida in Afghanistan, was arrested in December 1999 when a customs agent noticed that he appeared suspicious as he drove off a ferry at Port Angeles. A resulting search turned up a trunk full of explosives.

Ressam's capture, after a brief foot chase, prompted fears of a terrorist attack and the cancellation of Seattle's New Year's Eve fireworks.