FILE POOL - In this July 9, 2011 file photo, USMC Gen. John Allen, left, and Army Gen. David Petraeus, top U.S. commander in Afghanistan and incoming CIA
FILE POOL - In this July 9, 2011 file photo, USMC Gen. John Allen, left, and Army Gen. David Petraeus, top U.S. commander in Afghanistan and incoming CIA Director, greet former CIA Director and new U.S. Defense Secretary Leon Panetta, right, as he lands in Kabul, Afghanistan, Saturday, July 9, 2011. (AP Photo/Paul J. Richards, Pool) (PAUL J. RICHARDS)

| » Scandal's cast of characters

| » A socialite's downfall

WASHINGTON - It started in May with a spiteful email to the top U.S. commander in Afghanistan. An anonymous writer warned Gen. John Allen that a friend with whom he was meeting in Washington the following week was trouble and he should stay away from her.

Allen thought the email was a joke because he didn't know how anybody else would know about his personal plans with his friend, Florida socialite Jill Kelley, a person close to Kelley said.

That email started a chain of events that led to the downfall of CIA Director David Petraeus, put Allen's career on hold and landed a decorated FBI agent in hot water for talking about an ongoing investigation. The FBI traced that email and others of a similar vein to Paula Broadwell, Petraeus' biographer, who agents would soon learn had also been his lover.

The fast-moving scandal broke just days after President Barack Obama was elected to a second term in office. Obama's administration had been on the defensive for weeks because of a terror attack on the U.S. Consulate in Benghazi, Libya, that left four Americans dead. Briefings on the attack had been postponed until after the election and are now focused more immediately on Petraeus' love life than on how terrorists were able to attack the poorly defended consulate.

Obama said Wednesday he's seen no evidence that national security was damaged by the revelations that ended his CIA director's career and imperil that of his Afghanistan war commander. But lawmakers aren't taking Obama's word for it and grilled FBI and CIA officials privately about the same issues: whether national security was jeopardized by the case and why they didn't know about the investigation sooner.

The FBI's investigation of the matter began last summer when Kelley turned over anonymous emails that had been sent to her and Allen.

FILE - In this Aug. 31, 2011 file photo, former Commander of International Security Assistance Force and U.S. Forces-Afghanistan Gen. Davis Petraeus,
FILE - In this Aug. 31, 2011 file photo, former Commander of International Security Assistance Force and U.S. Forces-Afghanistan Gen. Davis Petraeus, standing with his wife Holly, participates in an armed forces farewell tribute and retirement ceremony at Joint Base Myer-Henderson Hall in Arlington, Va. Gen. Petraeus, the retired four-star general who led the U.S. military campaigns in Iraq and Afghanistan, resigned Friday, Nov. 9, 2012 as director of the CIA after admitting he had an extramarital affair. (AP Photo/Susan Walsh, File) (Susan Walsh)
The first anonymous email was sent to Allen in May, under the pseudonym "Kelleypatrol," the person close to Kelley said, speaking on condition of anonymity because of the ongoing investigation.

In midsummer, Kelley shared these emails with an FBI agent, Frederick W. Humphries, whom she met at an FBI community program in 2011.

Concerned that someone was tracking the movements of Allen and Petraeus, the FBI agent set the investigation in motion when he handed the information to the FBI's cyber squad in Tampa. But Humphries was cut out of the loop and took that to mean the FBI was not taking the case seriously, the person close to Kelley said. Humphries would later reach out to Congress in a whistle-blower role that has now landed him under internal scrutiny at the bureau.

But the FBI was taking the case seriously and continues to investigate.

The FBI has found a substantial number of classified documents on Broadwell's computer and in her home, according to a law enforcement official who spoke on condition of anonymity because the official was not authorized to speak publicly about the case. Broadwell has told agents that she took classified documents out of security government buildings, the official said. Unauthorized possession of classified national defense documents is a crime. The Army has suspended Broadwell's security clearance, which she had as a former Army intelligence officer.

The FBI also found emails between Kelley and Allen that were turned over to the Defense Department for investigation.

Jill Kelley leaves her home Monday, Nov 12, 2012 in Tampa, Fla. Kelley is identified as the woman who allegedly received harassing emails from Gen. David
Jill Kelley leaves her home Monday, Nov 12, 2012 in Tampa, Fla. Kelley is identified as the woman who allegedly received harassing emails from Gen. David Petraeus' paramour, Paula Broadwell. She serves as an unpaid social liaison to MacDill Air Force Base in Tampa, where the military's Central Command and Special Operations Command are located. (Chris O'Meara)
Obama has put on hold Allen's nomination to become the next commander of U.S. European Command as well as the NATO supreme allied commander in Europe until Pentagon investigators are able to sift through the emails that involve Allen and Kelley.

Gen. Martin Dempsey, chairman of the Joint Chiefs of Staff, said Thursday he still expects Allen to eventually take over the European Command, but acknowledged, "I see this investigation and how long it could take affecting that."

In an interview with American Forces Press Service, Dempsey said "I absolutely have confidence" in Allen's ability to continue in command in Afghanistan despite the distraction of the scandal. 

Speaking at a news conference in Bangkok on Thursday, Defense Secretary Leon Panetta also said he retains confidence in Allen. He added that he knows of no other senior U.S. military officers being linked to the Petraeus investigation.

The Pentagon chief also told reporters he could not rule out the possibility that the Taliban in Afghanistan would try to use Petraeus' admission of an extramarital affair for propaganda purposes. Petraeus was Allen's predecessor as top U.S. commander in Afghanistan.

FBI Director Robert Mueller and Deputy Director Sean Joyce met privately with legislators on both sides of the Capitol on Wednesday to explain how the investigation unfolded. They met first with Senate Intelligence Committee Chairwoman Dianne Feinstein, D-Calif., and ranking Republican Saxby Chambliss of Georgia, then crossed the Capitol to meet with the House Intelligence Committee.

Acting CIA Director Michael Morell went before the House panel next, after meeting a day earlier with top Senate intelligence officials to explain the CIA's take on events that led to Petraeus' resignation.

The questioning on Capitol Hill was continuing Thursday. And Kelley's decision to contact her friend at the FBI continues to reverberate months later.

Her own pass to enter MacDill Air Force Base in Florida had been indefinitely suspended, a move that ends her easy access to the senior military officials that dot her social world.

---

Associated Press writers Kimberly Dozier, Pauline Jelinek, Lolita C. Baldor, Michael J. Sniffen, Pete Yost and Robert Burns contributed to this report.