WASHINGTON — Conflicting portrayals of e-mails written by Gen. John R. Allen, the top American and NATO commander in Afghanistan, emerged Tuesday after it was disclosed that the general was under investigation for what the Pentagon called “inappropriate communication” with the woman whose complaint to the F.B.I. set off the scandal involving David H. Petraeus’s extramarital affair.

Defense Secretary Leon E. Panetta and other officials traveling with him to Australia overnight on Monday disclosed the inquiry into General Allen’s e-mails with Jill Kelley, the woman in Tampa, Fla., who was seen by Paula Broadwell, Mr. Petraeus’s lover, as a rival for his attentions.

Mr. Panetta, along with Gen. Martin E. Dempsey, the chairman of the Joint Chiefs of Staff, referred the Allen matter to the Pentagon’s inspector general, according to Mr. Panetta’s aides, after a team of military and civilian lawyers reviewed what defense officials say are thousands of pages of documents, including hundreds of e-mails between General Allen and Ms. Kelley, that the F.B.I. forwarded to the Pentagon.