The associates spoke on condition of anonymity because they weren't authorized to publicly discuss the matters, which could be part of an FBI investigation.
Petraeus, who led U.S. military efforts in Iraq and Afghanistan, resigned as CIA boss Friday, acknowledging his extramarital affair with Broadwell and expressing deep regret.
New details of the investigation that brought an end to his storied career emerged as President Obama hunted for a new CIA director and members of Congress questioned why the probe into Petraeus' extramarital activities was kept quiet for so long.
Kelley, who grew up in Northeast Philly, began to receive harassing emails in May, according to two federal law-enforcement officials. These emails prompted her to contact authorities.
FBI agents traced the alleged cyber harassment to Broadwell, the officials said, and discovered that she was exchanging intimate messages with a Gmail account. Further investigation revealed the account belonged to Petraeus under an alias.
Petraeus and Broadwell apparently used a trick, known to terrorists and teenagers alike, to conceal their email traffic, one law-enforcement official said.
Rather than transmitting emails to the other's inbox, they composed at least some messages and instead of transmitting them, left them in a draft folder or in an electronic "dropbox," the official said. Then the other person could log onto the same account and read the draft emails there. This avoids an easier-to-trace email trail.
Broadwell had co-authored a biography titled All In: The Education of General David Petraeus, published in January. In the preface, she said she met Petraeus in spring 2006, while she was a graduate student at Harvard's Kennedy School of Government and she ended up following him on multiple trips to Afghanistan as part of her research.
But the contents of the email exchanges between Petraeus and Broadwell suggested to FBI agents that their relationship was intimate. The FBI concluded relatively quickly - by late summer at the latest - that no security breach had occurred, the two senior law-enforcement officials said. But the FBI continued its investigation into whether Petraeus had any role in the harassing emails.
Petraeus, 60, told one former associate that he began an affair with Broadwell, 40, a couple of months after he became the director of the CIA late last year. They both agreed to end the affair four months ago, but kept in contact because she was still writing a dissertation on his time commanding U.S. troops overseas, the associate said.
(Vernon Loeb, a Washington Post editor who co-authored Broadwell's book, wrote on the newspaper's website Monday night that he had been "clueless" about her affair with Petraeus. "I never anticipated the extramarital affair . . . ," wrote Loeb, a former Inquirer reporter and editor. "On rare occasions, her good looks and close access would prompt a colleague to raise an eyebrow about their relationship, but I never took it seriously.")
Kelley, 37, regularly kept in touch with then-Gen. Petraeus when he became commander of the Afghan war effort, the two exchanging near-daily emails and instant messages, two of his former staffers say. But those messages were exchanged in accounts that his aides monitored as part of their duties and were not romantic in tone, the staffers said.
Kelley did not answer the door at her Tampa home Monday morning, and later left her home by car without talking with reporters.
The Kelleys hired Abbe Lowell, a Washington lawyer who has represented well-known clients including lobbyist Jack Abramoff and former presidential candidate John Edwards, and released a statement Sunday through a Washington-based crisis-management firm that she and her family had been friends with the Petraeus family for five years and wanted to respect their privacy.
Petraeus and his family are devastated over the affair, especially Mrs. Petraeus, who "is not exactly pleased right now," after 38 years of marriage, said Steve Boylan, a friend and former Petraeus spokesman, who spoke with him over the weekend.
"Furious would be an understatement," Boylan told ABC's "Good Morning America." The couple has two adult children, including a son who led an infantry platoon in Afghanistan as an Army lieutenant.
Broadwell is married with two young sons and lives in Charlotte, N.C. She has not returned phone calls or emails seeking comment.