The affair that brought an end to David Petraeus' tenure as CIA director came to light during an FBI investigation into a complaint that his biographer Paula Broadwell was sending harassing e-mails to another woman close to him, a U.S. official said Saturday.
During the investigation, other communications surfaced between Petraeus and Broadwell, a married mother of two, according to the official.
The official did not identify the woman who made the initial complaint and did not know the nature of her relationship with Petraeus.
The FBI interviewed Petraeus in the course of its inquiry, said the official, who stressed that the CIA director was never the target of the investigation and his communications were never compromised. The official did not know whether Broadwell was interviewed.
The official did not have an exact timeframe for the investigation and could not say if it is still ongoing.
CNN has not been able to reach Broadwell for comment.
The Obama administration first learned of the affair in a phone call from the FBI to Director of National Intelligence James Clapper at 5 p.m. on election night, according to a senior U.S. intelligence official.
On Saturday, questions arose about why congressional leaders were not informed of the investigation immediately.
According to a congressional aide familiar with the matter, the House and Senate intelligence committees weren't informed that there was an FBI investigation into the situation until Friday.
"The committees are required to be kept informed of significant intelligence activities," the aide said Saturday. "If there was an official investigation that was looking, at least in part, at information that was compromising the CIA director, then I think there's a solid argument to say that the committee leadership should have been notified to at least some level of detail."
The resignation also comes days before Petraeus was slated to testify before the Senate Intelligence Committee about the September 11 attack on the U.S. Consulate in Benghazi, Libya. The attack, in which four Americans were killed, became a point of contention during the presidential campaign.
Some have even suggested that the timing of Petraeus' stepping down is suspect, given the expected grilling in Congress. Acting CIA Director Michael Morell will testify instead.
"Director Petraeus' frank and forthright letter of resignation stands on its own," said a senior U.S. official, who spoke on the condition of anonymity because of the sensitivity of the topic. "Any suggestion that his departure has anything to do with criticism about Benghazi is completely baseless."
Homeland Security Committee Chairman Rep. Peter King, R-New York, who is also a member of the House Permanent Select Committee on Intelligence, insisted that Petraeus should not back out of plans to testify.
King, a vocal critic of the Obama administration's handling of the Benghazi attack, said on CNN's "Erin Burnett OutFront" that Petraeus is "an absolutely essential witness, maybe more than anybody else."
"David Petraeus' testifying has nothing to do with whether or not he's still the CIA director, and I don't see how the CIA can say he's not going to testify," King said.
"I think his testimony is certainly valuable, it's certainly necessary," King continued. "He was at the center of this, and he has answers that only he has."
If Petraeus does not testify as originally scheduled on Thursday, King said, "It should be very soon after that."
Broadwell spent a year with Petraeus in Afghanistan interviewing him for the book she co-wrote, "All In: The Education of General David Petraeus."
Petraeus' departure Friday appeared to be an abrupt end to a spectacularly successful career in public service.
"After being married for over 37 years, I showed extremely poor judgment by engaging in an extramarital affair. Such behavior is unacceptable, both as a husband and as the leader of an organization such as ours," Petraeus said in a letter to colleagues, explaining his decision to step down.
"Teddy Roosevelt once observed that life's greatest gift is the opportunity to work hard at work worth doing. I will always treasure my opportunity to have done that with you and I will always regret the circumstances that brought that work with you to an end," he said.
Petraeus, 60, had a distinguished 37-year career in the military before joining the CIA, helping turn the tide against insurgents while commanding forces in Iraq and Afghanistan. Earning praise from both sides of the political aisle, the retired four-star general took the helm of the CIA in September 2011.
Petraeus met with Obama on Thursday to offer his resignation and explain the circumstances behind it, according to a senior administration official. The president accepted Petraeus' resignation during a phone call Friday, the official said.
"By any measure, he was one of the outstanding general officers of his generation, helping our military adapt to new challenges and leading our men and women in uniform through a remarkable period of service in Iraq and Afghanistan, where he helped our nation put those wars on a path to a responsible end," Obama said in a statement.
"As director of the Central Intelligence Agency, he has continued to serve with characteristic intellectual rigor, dedication and patriotism."
Petraeus assumed command of the NATO International Security Assistance Force and U.S. Forces Afghanistan in July 2010, after serving for more than 20 months as commander of U.S. Central Command. He previously commanded multinational forces in Iraq, leading the so-called surge.
The general literally wrote the book on counterinsurgency techniques by overseeing development of the Army/Marine Corps Counterinsurgency Manual.
Before his nomination as CIA director, Petraeus was considered the nation's most well-known and popular military leader since Colin Powell.
Petraeus and his wife, Holly, live in Virginia. They have two grown children.
Remember, if or when you defame and cyberharass others - it often reveals more about you than your target. EOPC