WASHINGTON — Are a string of angry emails really enough, in an age of boisterous online exchanges, to persuade the FBI to open a cyberstalking investigation?

Sometimes the answer is yes, law enforcement officials and legal experts said Monday — especially if the emails in question reflect an inside knowledge of the CIA director.

That was true of the emails sent anonymously to Jill Kelley, a friend of the CIA director, David H. Petraeus, which prompted the FBI office in Tampa, Fla., to begin an investigation in June. The inquiry traced the emails to Petraeus’ biographer, Paula Broadwell, exposed their extramarital affair, and led Friday to his resignation after 14 months as head of the intelligence agency.

Some commentators have questioned whether the bureau would ordinarily investigate a citizen complaint about unwanted emails, suggesting that there must have been a hidden motive, possibly political, to take action. FBI officials are scheduled to brief the Senate and House intelligence committees Tuesday about the case.

But law enforcement officials insisted Monday that the case was handled “on the merits.” The cyber squad at the FBI’s Tampa field office opened an investigation, after consulting with federal prosecutors, based on what appeared to be a legitimate complaint about email harassment.

The complaint was more intriguing, the officials acknowledged, because the author of the emails, which criticized Kelley for supposed flirtatious behavior toward Petraeus at social events, seemed to have an insider’s knowledge of the CIA director’s activities. The emails suggested that their author knew Petraeus and had witnessed his interactions with Kelley.

“There was a legitimate case to open on the facts, with the support of the prosecutors,” said one official, speaking on condition of anonymity because the case remains open.

He added, “They asked, does somebody know more about Petraeus than you’d expect?”

Kelley, a volunteer with wounded veterans and military families, brought her complaint to a rank-and-file agent she knew from a previous encounter with the FBI office. But the officials said the agent was “just a conduit” for the complaint and did not get it special attention.

David H. Laufman, who served as a federal prosecutor in national security cases from 2003 to 2007, said, “there’s a lot of chatter and noise about cybercrimes,” and most of it does not lead to an investigation. But he added, “It’s plausible to me that if Ms. Kelley indicated that the stalking was related to her friendship with the CIA director, that would have elevated it as a priority for the bureau.”