Earlier this year, Petraeus' family friend Jill Kelley began receiving threatening emails. She alerted authorities, launching an FBI investigation. Authorities were able to trace the messages to biographer Paula Broadwell, and during their investigation, the FBI discovered intimate email exchanges between Broadwell and Petraeus.
Petraeus, 60, says his relationship with Kelley was platonic, but Broadwell, 40, apparently saw her as a romantic rival, sending her messages to stay away from Petraeus.
The retired general was shocked to find out about Broadwell's emails to Kelley, an associate said. Petraeus was not shown the messages.
"We and our family have been friends with Gen. Petraeus and his family for over five years." Kelley said in a statement Sunday. "We respect his and his family's privacy and want the same for us and our three children."
Petraeus, who led U.S. military efforts in Iraq and Afghanistan, resigned Friday, acknowledging his extramarital affair with Broadwell and expressing deep regret.
Members of Congress questioned why the months-long probe was kept quiet for so long, but law enforcement said it was because the FBI considered the affair part of its criminal investigation - not a threshold of intelligence probe. Petraeus himself was never the focus of the investigation, sources say, and there has been no evidence that he broke any law.
FBI agents contacted Petraeus about sensitive, possibly classified, documents related to Afghanistan that were found on Broadwell's computer. But Petraeus assured investigators they did not come from him. The FBI concluded there was no security breach.
House Majority Leader Eric Cantor knew of the affair almost two weeks before Petraeus resigned. According to a senior Cantor aide, the Republican congressman from Virginia found out in a phone conversation with an FBI agent Oct. 27.
Broadwell had co-authored a biography titled "All In: The Education of General David Petraeus," published in January. She had extraordinary access to Petraeus during six trips she took to Afghanistan as his official biographer, which was a plum assignment for a novice writer.
"For him to allow the very first biography to be written about him, to be written by someone who had never written a book before, seemed very odd to me," former Petraeus aide Peter Mansoor told ABC News.
The affair between Petraeus and Broadwell began several months after his retirement from the Army in August 2011, according to retired U.S. Army Col. Steve Boylan, and Petraeus ended it four months ago.
ABC News and The Associated Press contributed to this report.