WASHINGTON - There's now a Canadian connection to the David Petraeus sex scandal following revelations that the FBI agent who helped uncover the disgraced CIA director's extra-marital affair went to high school in Canada and played a key role in the infamous Ahmed Ressam case 13 years ago.

Frederick Humphries, one of the key players in the tawdry unravelling of Petraeus's once-storied career, set the wheels in motion for the general's downfall after he agreed last spring to investigate anonymous emails sent to a friend in Tampa, socialite Jill Kelley.

That probe revealed Petraeus's affair with Paula Broadwell, who was behind the harassing emails to Kelley, a woman she viewed as a rival for the four-star general's affections.

Humphries, 47, a counterterrorism specialist at the FBI, was born in the Washington state community of Steilacoom but attended high school somewhere in Ontario. His mother and stepfather live in Illinois.

He reportedly learned French in the Canadian school system, a skill that helped him nab Ressam, who claimed to be a Montrealer in 1999 as he attempted to sneak across the Canada-U.S. border to blow up the Los Angeles airport in a thwarted millennium attack.

Ressam, an Algerian al-Qaida member who lived in Montreal, was apprehended with explosives in the trunk of his car on a Canadian ferry to the U.S. and claimed only to speak French. But while reading Ressam his rights in the language, Humphries immediately knew he was not Quebecois, detecting an Algerian accent instead.

He warned his superiors that Ressam — who insisted he was someone named Benni Antoine Noris — was lying.

Before long, investigators discovered Ressam was using false ID and had charged him with plotting what would have been a deadly attack on one of the busiest airports in the U.S. Ressam is now serving a 37-year sentence.

The Ressam case resulted in lingering perceptions in the United States that Canada has a porous border — fears that have resulted in beefed-up border security over the past decade.

Humphries reportedly also challenged FBI brass for its decision to turn Ressam over to agents from New York in the aftermath of the Sept. 11, 2001, attacks two years later.

The Seattle Times reported that Humphries warned their strong-arm interrogation tactics threatened to undo his hard work convincing Ressam to co-operate. Humphries had gleaned a wealth of intelligence from Ressam about al-Qaida operatives, including information that helped thwart Richard Reid, the would-be shoe-bomber.

True to his predictions, Ressam did, indeed, ultimately stop providing information on al-Qaida to investigators and even tried to recant some of what he'd already told them.

Humphries testified in defence of Ressam about his harsh post-9-11 treatment at the hands of fellow agents. That led to intense criticism within the FBI, but Humphries was adamant he'd done the right thing.

The judge who oversaw Ressam's trial in Los Angeles praised Humphries repeatedly for his dedication and integrity.

A Canadian reporter who covered those proceedings called Humphries "the perfect picture of moral rectitude."

Thirteen years later, and the media spotlight on Humphries isn't quite so friendly.

Like almost everyone else in the ongoing Petraeus soap opera, Humphries — described as a hard-working but aggressive agent — has been tainted by accusations of seamy behaviour and personal vendettas.

The married Humphries has denied sending Kelley shirtless photos of himself after the investigation into her email began. In fact, he told the Seattle Times this week, the photo was sent two years ago as part of an ongoing joke, and was a picture he'd also sent to other friends and even a friendly reporter at the newspaper.

The Seattle Times posted the photo on its website on Thursday. It shows a smiling, bare-chested Humphries posing with his arms around two bullet-ridden shooting range dummies that possess a similar buff physique.

"There was absolutely no romantic involvement or relationship whatsoever between Agent Humphries and Jill Kelley," his lawyer, Lawrence Berger, told ABC News.

Yet the married University of Tampa criminology graduate was removed from the Kelley investigation in the summer amid fears he was too personally involved.

Humphries, however, suspected a coverup aimed at protecting U.S. President Barack Obama ahead of the November election, and tipped off a Republican congressman. He also reportedly feared the emails showing up in Kelley's inbox presented a national security risk given they contained details about the comings and goings of two powerful generals.

Humphries has acknowledged tipping off Washington state congressman Dave Reichert, but didn't provide further details in his interview with the Seattle Times.

Loading Slideshow...
  • David Petraeus

    A highly decorated four-star Army general lauded for his leadership of the Iraq and Afghanistan wars, Petraeus moved into the civilian world to become CIA director in September 2011. He shocked official Washington on November 9, 2012 by admitting an extramarital affair with his biographer and resigning his spymaster post. (Text via <a href="http://www.huffingtonpost.com/huff-wires/20121114/us-scandal-scorecard/">The Associated Press</a>)

  • Paula Broadwell

    The other woman. An author and married mom of two young children, she was a West Point-educated Army reservist and graduate student when she met Petraeus at Harvard in 2006. She later embarked on a case study on his leadership of the Iraq War. After he took the helm in Afghanistan, Broadwell expanded her work into a biography, gaining unprecedented access to Petraeus and his commanders. It's called "All In: The Education of General David Petraeus." Their affair began in November 2011, a couple of months after he became CIA director, according to retired Army Col. Steve Boylan, a friend of the Petraeus family. It ended last summer, Boylan said. The relationship was exposed after Broadwell of Charlotte, N.C., sent emails to another woman, Jill Kelley, warning her to stay away from Petraeus, officials said. (Text via <a href="http://www.huffingtonpost.com/huff-wires/20121114/us-scandal-scorecard/">The Associated Press</a>)

  • Jill Kelley

    All threads in the story trace back to this Tampa, Fla., socialite. A surgeon's wife and mother of three children, Kelley is a sort of self-appointed social ambassador for the nearby U.S. Central Command and other officers at MacDill Air Force Base. The Kelleys opened their bayside home to lavish parties where military brass mingled with Tampa's elite. In this role, she befriended Petraeus and his wife, Holly, when he took over Central Command in October 2008. Kelley stayed in close contact with Petraeus after he left to take command of the Afghanistan war. They exchanged nearly daily emails in an account routinely monitored by his aides, according to two former staffers, who said those messages weren't romantic in tone. In May 2012, Kelley started getting anonymous, harassing emails warning her away from Petraeus. She reported the email to the FBI. The FBI traced the messages to Broadwell, uncovering her affair with Petraeus. The FBI notified Petraeus' boss, Director of National Intelligence James Clapper, who urged him to resign. And the FBI found something more. It unearthed "inappropriate communications" between Kelley and another top military officer, John Allen, according to Pentagon officials. (Text via <a href="http://www.huffingtonpost.com/huff-wires/20121114/us-scandal-scorecard/">The Associated Press</a>)

  • John Allen

    The four-star Marine general who followed in Petraeus' footsteps at Central Command and then as top U.S. commander in Afghanistan is now following him into choppy waters. The Pentagon is investigating 20,000 pages of documents and emails involving Allen, who is married, and Kelley. Some of the communications were "flirtatious," according to a senior defense official, who spoke on condition of anonymity because he wasn't authorized to discuss the case publicly. Like Petraeus, Allen, 58, was part of the Tampa social circle; he moved up to acting commander when Petraeus left for Afghanistan. When Petraeus came home from Afghanistan, Allen moved into the top job there – his current post. President Barack Obama had nominated Allen to take over U.S. European Command and lead all NATO forces in Europe. (Text via <a href="http://www.huffingtonpost.com/huff-wires/20121114/us-scandal-scorecard/">The Associated Press</a>)

  • Natalie Khawam

    Kelley's twin sister also socialized with the two generals. Both Petraeus and Allen wrote letters lauding Khawam as a devoted mother to help her in a bitter child custody battle with her ex-husband. Earlier in that divorce case, Superior Court Judge Neal Kravitz had criticized Khawam for a lack of honesty and "misrepresentations about virtually everything." (Text via <a href="http://www.huffingtonpost.com/huff-wires/20121114/us-scandal-scorecard/">The Associated Press</a>)

  • Holly Petraeus

    Petraeus' wife of 38 years, mother of their two grown children, is in charge of service member assistance at the Consumer Financial Protection Bureau and is a well-known advocate for military families. Mrs. Petraeus is said to be devastated by her husband's infidelity. "Furious would be an understatement," family friend Boylan told ABC's "Good Morning America." (Text via <a href="http://www.huffingtonpost.com/huff-wires/20121114/us-scandal-scorecard/">The Associated Press</a>)

  • FBI Agent Frederick W. Humphries

    Humphries, 47, was the agent who initially saw the emails the FBI said Petraeus' biographer and mistress, Paula Broadwell, sent to Tampa socialite Jill Kelley, a woman she apparently saw as a rival for Petraeus' affections. She also allegedly sent emails to Gen. John Allen, Kelley's friend and the top U.S. commander in Afghanistan. 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. (Text via <a href="http://www.huffingtonpost.com/2012/11/14/frederick-humphries_n_2134203.html" target="_hplink">The Associated Press</a>)