Updated

The chain of events that triggered the probe that ultimately uncovered David Petraeus' affair started with harassing emails sent from dummy accounts operated by the spymaster's paramour, Fox News has learned.

The new details help clarify the somewhat confusing narrative regarding how the head of the CIA ended up in the FBI's crosshairs in the first place. Fox News confirmed Sunday that it all started when another woman, 37-year-old Jill Kelley, a close friend of the Petraeus family, received harassing emails. She then alerted the FBI, where a friend of Kelley's works, about the emails that appeared to be an attempt to blackmail Petraeus, which started the investigation, sources said.

But there were initially questions over where those emails came from, with early indications that they might not have come from Petraeus biographer Paula Broadwell, with whom he was carrying on an affair.

However, Fox News can now confirm from multiple law enforcement sources that those emails came from multiple dummy accounts, which were traced back to Broadwell. The reason the FBI had jurisdiction is because cyber-harassment is a federal crime. And once the FBI got to Broadwell, they uncovered the affair.

From there, Fox News has learned, the first knowledge of the affair outside the FBI came from an agency whistle-blower who contacted a Capitol Hill Republican, who then told House Majority Leader Eric Cantor.

More On This...

Rep. Dave Reichert, R-Wash., got a tip from a friend who knew the whistle-blower, as first reported by The New York Times.

Sources tell Fox News that Reichert talked to the whistle-blower, then referred him to Cantor. The whistle-blower talked to the majority leader's office, then to Cantor directly. The whistle-blower -- who purportedly was concerned about a possible national security breach -- was then put in touch with FBI Director Robert Mueller.

Cantor staffers said they didn't immediately tell the House Intelligence Committee or chamber leaders because they didn't know whether the tip was credible.

No security breaches appear to have occurred in the email exchange, but Capitol Hill lawmakers expressed shock and disappointment about the stunning revelations and said Petraeus made the correct choice in resigning.

Despite some initial reporting by other outlets about Kelley's position in the government, Fox News confirmed she does not work for the State Department or the military's Joint Special Operations Command.

Kelley, a Tampa, Fla., resident who is married with three children, and sister Natalie are close friends of the Petraeus' and spent holidays together. And she was not having an affair with the retired, four-star Army general, sources close to the family told Fox News.

Kelley issued a statement through Smith and Company, a Washington communications and crisis management firm, asking for privacy. She said she respects Petraeus' privacy and wants the same for her own family.

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

The relationship was an open secret with those who knew the Petraeus', sources also told Fox News.

Fox News' Jennifer Griffin, Mike Levine and Chad Pergram contributed to this report.