WASHINGTON -- The way the FBI responded to Jill Kelley's complaint about receiving harassing emails, which ultimately unraveled or scarred the careers of ex-CIA Director David Petraeus and Marine Gen. John Allen, is the exception, not the rule.

The FBI commonly declines to pursue cyberstalking cases without compelling evidence of serious or imminent harm to an individual, victims of online harassment, advocacy groups and computer crime experts told The Associated Press.

But in the sensational episode that uncovered the spy chief's adulterous affair, the FBI's cyberdivision devoted months of tedious investigative work to uncover who had sent insulting and anonymous messages about Kelley, the Florida socialite who was friendly with Petraeus and Allen – and friends with a veteran FBI counterterrorism agent in Tampa.

The bureau probably would have ignored Kelley's complaint had it not been for information in the emails that indicated the sender was aware of the travel schedules of Petraeus and Allen, the top U.S. commander in Afghanistan. Instead, the FBI considered this from the earliest stages to be an exceptional case, and one so sensitive that FBI Director Robert Mueller and Attorney General Eric Holder were kept notified of its progress.

How the FBI's investigation unfolded – especially its decision not to alert the White House, the director of national intelligence or Congress about its discovery of Petraeus's sexual affair until Election Day – is under scrutiny, especially because there is no indication so far that any criminal charges will be filed.

Mueller and his deputy, Sean Joyce, have met privately with lawmakers to defend how the inquiry was handled. Holder said on Thursday that law enforcement officials did not inform the president and Congress about the probe because it did not uncover any threat to national security.

President Barack Obama said he was withholding judgment until he learns more. "You know, we don't have all the information yet," Obama said at a White House news conference. "But I want to say that I have a lot of confidence generally in the FBI." He added that it was "best right now for us to just see how this whole process is unfolding."

The FBI's cybersquads, like the one in Tampa that investigated the Petraeus case, are primarily focused on blocking criminals and terrorists from using the Internet to threaten national security or steal valuable information stored in government and corporate computers.

An AP review of court records found only nine cases over the past two years that identified cyberstalking or cyberharassment as the underlying crime in federal criminal complaints. In one recent case, a Michigan man was charged with cyberstalking after using the Internet and text messages to contact female victims, many of them minors, in an effort to obtain pornographic pictures. In another case, the FBI arrested a man for sending emails threatening to kill Los Angeles model Kourtney Reppert and her family.

"They turn people away all the time on the grounds that (cyberstalking) is a civil matter, not a criminal one," said Danielle Citron, a professor at the University of Maryland School of Law who studies cyberharassment issues.

In one such incident, a woman told the AP that her ex-boyfriend posted online an intimate video and nude photos of her with her name and email address, and she complained to the FBI. Speaking on condition of anonymity because she feared personal and professional repercussions, the woman said she had been deluged with offensive messages from strangers who viewed the photos and video. Her personal and professional reputation had been ruined. She changed her name.

The FBI's advice to her: hire a lawyer.

But the FBI considered Kelley's complaint significant. And for good reason, said David Laufman, a former federal prosecutor who handled national security cases. "Most cases aren't going to get this level of attention or resources," he said. "But most cases don't involve the incumbent director of the CIA or the head of U.S. military forces in Afghanistan."

The first anonymous emails, which the FBI ultimately traced to Paula Broadwell, an Army reservist and Petraeus's biographer, were sent in May to Allen and several other generals warning them to stay away from Kelley. The emails came from the pseudonym "Kelleypatrol" and included notes on Allen's plans to see Kelley in Washington the following week. Concerned about how anyone else would know about his personal plans, Allen forwarded the emails to Kelley to see whether she was playing a prank on them. Other generals also forward to Kelley copies of emails they received.

In early June, Kelley herself received the first of as many as five emails sent from different anonymous accounts alleging that she was up to no good. One of messages cited Petraeus by name and mentioned an upcoming social visit they had planned in Washington. The mysterious emails were sent to Kelley's personal account and to a separate account she jointly monitored with her husband.

Kelley contacted an FBI agent in Tampa she had met years earlier. The bureau believed the emails were serious because they suggested the mysterious sender knew about upcoming meetings of the CIA director and a Marine Corps general.

Agents examined the digital fingerprints that emails leave behind and eventually determined Broadwell had sent the messages from an account set up with a fictitious name. As the agents looked further, they came across a private Gmail account that used an alias name. It turned out to be Petraeus'. The contents of several of the exchanges between Petraeus and Broadwell indicated they were having an affair. A search of Broadwell's computers also found classified documents.

Most cyberstalking allegations are handled by state and local law enforcement organizations, said Michelle Garcia, director of the Stalking Resource Center at the National Center for Victims of Crime. "Given the variety of crimes that the FBI is responsible for addressing, I think often some of the stalking ones don't elevate to the top of the priority list," she said.

State police agencies have little contact with the FBI in responding to cyberstalking cases, Garcia said. "In our work with local law enforcement, very rarely do they talk about working with federal authorities on these cases."

The Petraeus case has drawn attention to how easy it is for the government to examine emails and computer files if they believe a law was broken. The FBI and other investigating agencies armed with subpoenas and warrants routinely gain access to email accounts offered by Google, Yahoo and other Internet providers.

Civil liberties groups have criticized the FBI for pursuing the investigation of the emails to Kelley because there is no indication the messages contained any threatening language or classified information. The episode underscores the need to strengthen the legal protections for electronic communications, according to the American Civil Liberties Union.

Federal agencies can obtain a substantial amount of information about the online activities of an individual without getting a warrant from a judge. A subpoena approved by a federal prosecutor is usually sufficient to get access to stored emails and login data.

"These are invasive powers that need to have a check against overuse and abuse," said Chris Soghoian, a senior policy analyst at the ACLU. "And that check should be a judge."

The Senate Judiciary Committee is meeting later this month to consider legislation that would do just that. The bill would require a warrant for all Internet communications. Law enforcement officials have resisted the change. But all the attention from the Petraeus case could give proponents of the legislation the momentum they need to push the bill through.

"If we learn nothing else from the Petraeus scandal, it should be that our private digital lives can become all too public when over-eager federal agents aren't held to rigorous legal standards," staff attorneys for the Electronic Frontier Foundation wrote in a blog post.

___

Associated Press writers Pete Yost, Adam Goldman and Eileen Sullivan and Associated Press researcher Julie Reed contributed to this report.

Related on HuffPost:

Loading Slideshow...
  • Super Bowl XLIII Football

  • CIA-Director David Petraeus

  • Gen. Petraeus Testifies At Senate Confirmation Hearing

    WASHINGTON - JUNE 29: U.S. Gen. David Petraeus, the commander of U.S. forces in the Middle East, speaks during his confirmation hearing before the Senate Armed Services Committee as his wife Holly Petraeus listens on Capitol Hill June 29, 2010 in Washington, DC. Petraeus has been appointed by U.S. President Barack Obama to replace U.S. Gen. Stanley McCrystal as commander of the United States Forces Afghanistan. (Photo by Brendan Smialowski/Getty Images)

  • Defense Secretary Panetta Holds Briefing At Pentagon

    ARLINGTON, VA - OCTOBER 18: Holly Petraeus (R), assistant director for the Office of Servicemember Affairs at the Consumer Financial Protection Bureau, speaks as Acting Deputy Assistant Secretary of Defense for Military Community and Family Policy Chuck Milam looks on during a news briefing October 18, 2012 at the Pentagon in Arlington, Virginia. The Pentagon held a briefing on efforts to enhance the financial health of the force. (Photo by Alex Wong/Getty Images)

  • Petraeus Retirement

  • Petraeus Intelligence

  • Fort Cambell General Returns

  • CIA Director David Petraeus Rings The Opening Bell At The New York Stock Exchange

    NEW YORK, NY - SEPTEMBER 18: Central Intelligence Agency Director David Petraeus walks the floor of the New York Stock Exchange to ring the Opening Bell as the CIA Commemorates it's 65th Anniversary on September 18, 2012 in New York City. Stocks fell in early trading as investors continued to be concerned about Europe and the global economy. (Photo by Spencer Platt/Getty Images)

  • Biden Petraeus CIA

  • CIA-Direktor David Petraeus zurueckgetreten

  • CIA Director David Petraeus, testifies b

    CIA Director David Petraeus, testifies before the US Senate Intelligence Committee during a full committee hearing on 'World Wide Threats.' on January 31, 2012 on Capitol Hill in Washington, DC. Witnesses include: Director of National Intelligence, James Clapper, FBI Director Robert Mueller(L); Defense Intelligence Agency Director Lt. Gen. Ronald Burgess; National Counter terrorism Center Director Matthew Olsen; Assistant Secretary of State for Intelligence and Research Philip Goldberg; and Homeland Security Undersecretary for Intelligence and Analysis Caryn Wagner. AFP PHOTO/Karen BLEIER (Photo credit should read KAREN BLEIER/AFP/Getty Images)

  • Military Family Spending

  • Defense Secretary Panetta Holds Briefing At Pentagon

    ARLINGTON, VA - OCTOBER 18: Acting Deputy Assistant Secretary of Defense for Military Community and Family Policy Chuck Milam (R) speaks as Holly Petraeus, assistant director for the Office of Servicemember Affairs at the Consumer Financial Protection Bureau, looks on during a news briefing October 18, 2012 at the Pentagon in Arlington, Virginia. The Pentagon held a briefing on efforts to enhance the financial health of the force. (Photo by Alex Wong/Getty Images)

  • Biden Petraeus CIA

  • House Holds Hearing On Protecting Service Members In Consumer Financial Marketplace

    WASHINGTON, DC - NOVEMBER 03: Holly Petraeus, assistant director for service member affairs at the Consumer Financial Protection Bureau, participates in a Senate Banking, Housing and Urban Affairs Committee hearing on Capitol Hill, on November 3, 2011 in Washington, DC. The committee heard testimony from Petraeus on protecting veterans and active service members and their families in the consumer financial marketplace. (Photo by Mark Wilson/Getty Images)

  • House Holds Hearing On Protecting Service Members In Consumer Financial Marketplace

    WASHINGTON, DC - NOVEMBER 03: (L-R) Sen. Jack Reed (D-RI) introduces himself to Holly Petraeus, assistant director for service member affairs at the Consumer Financial Protection Bureau, during a Senate Banking, Housing and Urban Affairs Committee hearing on Capitol Hill, on November 3, 2011 in Washington, DC. The committee heard testimony from Petraeus on protecting veterans and active service members and their families in the consumer financial marketplace. (Photo by Mark Wilson/Getty Images)

  • Petraeus Retirement

  • David Petraeus Sworn In As CIA Director

    WASHINGTON, DC - SEPTEMBER 06: Vice President Joseph Biden (R) swears in David Petraeus (C) to be Director of the Central Intelligence Agency, while his wife Holly Petraeus holds a Bible, in the Roosevelt Room at the White House, on September 6, 2011 in Washington, DC. General Petraeus retired from the U.S. Army last week, and has now become the 20th director of the CIA. (Photo by Mark Wilson/Getty Images)