The F.B.I. agent who helped start the investigation that led to the resignation of David H. Petraeus as C.I.A. director is a “hard-charging” veteran counterterrorism investigator who used his command of French in investigating the foiled “millennium” terrorist plot in 1999, colleagues said on Wednesday.

The agent, Frederick W. Humphries II, 47, took the initial complaint from Jill Kelley, the Tampa, Fla., hostess who was socially active in military circles there, about e-mails she found disturbing that accused her of inappropriately flirtatious behavior toward Mr. Petraeus. The subsequent cyberstalking investigation uncovered an extramarital affair between Mr. Petraeus and Paula Broadwell, his biographer, who agents determined had sent the anonymous e-mails. It also ensnared Gen. John R. Allen, who now commands troops in Afghanistan, after the investigation discovered that he had sent “inappropriate communication” to Ms. Kelley.