In a new twist to the Gen. David Petraeus sex scandal, the Pentagon said Tuesday that the top American commander in Afghanistan, Gen. John Allen, is under investigation for alleged "inappropriate communications" with a woman who is said to have received threatening emails from Paula Broadwell, the woman with whom Petraeus had an extramarital affair.

Defense Secretary Leon Panetta said in a written statement issued to reporters aboard his aircraft, en route from Honolulu to Perth, Australia, that the FBI referred the matter to the Pentagon on Sunday.

Panetta said that he ordered a Pentagon investigation of Allen on Monday.

A senior defense official traveling with Panetta said Allen's communications were with Jill Kelley, who has been described as an unpaid social liaison at MacDill Air Force Base, Fla., which is headquarters to the U.S. Central Command. She is not a U.S. government employee.

Kelley is said to have received threatening emails from Broadwell, who is Petraeus' biographer and who had an extramarital affair with Petraeus that reportedly began after he became CIA director in September 2011.

Petraeus resigned as CIA director on Friday.

Allen, a four-star Marine general, succeeded Petraeus as the top American commander in Afghanistan in July 2011.

The senior official, who discussed the matter only on condition of anonymity because it is under investigation, said Panetta believed it was prudent to launch a Pentagon investigation, although the official would not explain the nature of Allen's problematic communications.

The official said 20,000 to 30,000 pages of emails and other documents from Allen's communications with Kelley between 2010 and 2012 are under review. He would not say whether they involved sexual matters or whether they are thought to include unauthorized disclosures of classified information. He said he did not know whether Petraeus is mentioned in the emails.

"Gen. Allen disputes that he has engaged in any wrongdoing in this matter," the official said. He said Allen currently is in Washington.