What the ….?

PERTH, Australia — The FBI probe into the sex scandal that prompted CIA Director David Petraeus to resign has expanded to ensnare Gen. John R. Allen, the commander of U.S. and NATO troops in Afghanistan, the Pentagon announced early Tuesday.

According to a senior U.S. defense official, the FBI has uncovered between 20,000 and 30,000 pages of documents — most of them e-mails — that contain “potentially inappropriate” communication between Allen and Jill Kelley, the 37-year-old Tampa woman whose report of harassment by a person who turned out to be Petraeus’s mistress ultimately led to Petraeus’s downfall.

Allen, a Marine, succeeded Petraeus as the top allied commander in Afghanistan in July 2011. He also served as Petraeus’s deputy when both generals led the military’s Tampa-based Central Command from 2008 until 2010.

The FBI first notified the Pentagon of its investigation into Allen’s communications with Kelley on Sunday evening, according to the senior defense official, who spoke on condition of anonymity to discuss details of the pending case.

In response, Pentagon chief Leon E. Panetta referred the investigation on Monday to the Defense Department’s Inspector General for further review, according to a statement released by Panetta early Tuesday as he was traveling to Australia.