The scandal that brought down CIA director David Petraeus started with harassing e-mails sent by his biographer and lover, Paula Broadwell, to another woman, and eventually led to the FBI to discover the affair, sources said.
Retired four-star general Mr Petraeus quit on Friday after admitting an extramarital relationship.
An official said the FBI investigation began several months ago with a complaint against Ms Broadwell, a 40-year-old graduate of the US Military Academy at West Point, and an army reserve officer.
That probe led agents to her e-mail account, which uncovered the relationship with 60-year-old Mr Petraeus, acclaimed for his leadership of the wars in Iraq and Afghanistan.
The identity of the other woman and her connection with Ms Broadwell were not immediately known.
Concerned that the e-mails he exchanged with Ms Broadwell raised the possibility of a security breach, the FBI brought the matter up with Mr Petraeus directly, according to the official, who spoke anonymously because he was not authorised to publicly discuss the investigation.
The FBI approached the CIA director because his e-mails in the matter were in most instances sent from a personal account, not his CIA one.
Mr Petraeus decided to resign, abruptly ending a high-profile career that might have culminated with a run for the US presidency, a notion he was believed to be considering.
"Such behaviour is unacceptable, both as a husband and as the leader of an organisation such as ours," Mr Petraeus wrote to his staff.
He handed his resignation letter to President Barack Obama on Thursday, stunning many in the White House, the CIA and Congress. The news broke in the media before the House of Representatives and Senate intelligence committees had been briefed, officials say.
By Friday evening, multiple officials identified Ms Broadwell, who spent the better part of a year reporting on Mr Petraeus' time in Afghanistan. Members of Congress are now demanding answers to questions about the affair.
House intelligence committee chairman Mike Rogers and ranking Democratic member Dutch Ruppersberger will meet FBI deputy director Sean Joyce and CIA acting director Michael Morell on Wednesday to ask questions, including how the investigation came about, according to a senior congressional staffer.
"He is truly remorseful about everything that's happened," said Steve Boylan, a retired army officer and former Petraeus spokesman who spoke to the former general yesterday.
In a phone call with Mr Boylan, Mr Petraeus lamented the damage he had done to his "wonderful family" and the hurt he had caused his wife.
Ms Broadwell interviewed the general and his close associates intensively for more than a year to produce the best-selling biography All In: The Education Of General David Petraeus, which was written with Vernon Loeb, a Washington Post editor, and published in January.
Most Popular Stories
- Major Phone Makers Sign Anti-Phone-Theft Pledge
- India Recognizes Transgender People as 'Third Gender'
- 'Beige Book' Federal Reserve Survey, April 2014: Full Text
- Brands Get Caught in Bitter-Tweet Traps
- Michael Bloomberg Takes Aim at the NRA
- U.S. Job Market Still Needs Fed Stimulus: Yellen
- Yellen Remarks, Market Data Give Stocks a Boost
- Dems in Energy States Back Away From Obama
- Man Arrested After Driving Stolen Car to Court Hearing
- Depp, Pfister Are Tech Philosophers