A senior U.S. military official says the author who had an affair with David Petraeus sent harassing emails to a woman who was the State Department's liaison to the military's Joint Special Operations Command.

The official says 37-year-old Jill Kelley in Tampa, Fla., received the emails from Petraeus biographer Paula Broadwell that triggered an FBI investigation.

The official was not authorized to discuss the case publicly and spoke on the condition of anonymity.

Another person who knows Kelley and Petraeus confirmed their friendship and said she saw him often.

Petraeus quit as CIA director last week after acknowledging an extramarital relationship with a woman, later identified as Broadwell.

The FBI probe began several months ago with a complaint against Broadwell. That investigation led to Broadwell's email account, which uncovered the relationship with Petraeus.