She may have been seen as a rival by Petraeus' biographer, Paula Broadwell, who sent Kelley a series of anonymous, harassing emails which touched off an investigation that uncovered evidence of an affair between Petraeus and Broadwell.
According to law enforcement sources, FBI investigators decided to pursue the matter when they found the messages contained information about the CIA chief's activities that was not publicly available.
The relationship was evidently close enough that both men intervened in a child custody battle involving Kelley's twin sister, Natalie Khawam.
"She is a dedicated mother, whose only focus is to provide the necessary support, love, and care for her son," Allen wrote about Khawam in a Sept. 22 letter to a Washington, D.C., court.
Allen and Kelley communicated often enough over the past two years to produce between 20,000 and 30,000 pages of email and other messages, which were turned over to Defense Department investigators on Sunday.
The actual volume of communications is likely much smaller, an official said, as the printouts include messages involving other people and email threads including prior communications.