President Obama has faith in Gen. John R. Allen, the top American and NATO commander in Afghanistan, the White House spokesman said on 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.
"The president thinks very highly of General Allen," the spokesman, Jay Carney, said at a White House news briefing. "He has faith in General Allen," and believes that he has done "an excellent job" as commander in Afghanistan, Mr. Carney added. General Allen's recent nomination to become the supreme allied commander in Europe, Mr. Carney said, is delayed at the request of Defense Secretary Leon E. Panetta pending the investigation's outcome.
Mr. Panetta and other officials disclosed overnight the investigation 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. Petraeus's affair led to his resignation as head of the C.I.A. on Friday, and the F.B.I.'s investigations into e-mails in the matter apparently led in turn to General Allen's correspondence.
In a statement released to reporters on his plane en route to Australia early Tuesday, Mr. Panetta said the F.B.I. on Sunday had referred "a matter involving" General Allen to the Pentagon.
Mr. Panetta turned the matter over to the Pentagon's inspector general to conduct an investigation into what a defense official said were thousands of pages of documents, many of them e-mails between General Allen and Ms. Kelley.
A senior law enforcement official in Washington said on Tuesday that F.B.I. investigators, looking into Ms. Kelley's complaint about anonymous e-mails she had received, examined all of her e-mails as a routine step.
"When you get involved in a cybercase like this, you have to look at everything," the official said, suggesting that Ms. Kelley may not have considered that possibility when she filed the complaint. "The real question is why someone decided to open this can of worms."
The official would not describe the content of the e-mails between General Allen and Ms. Kelley or say specifically why F.B.I. officials had decided to pass them on to the Defense Department. "Generally, the nature of the e-mails warranted providing them to D.O.D.," he said.
Under military law, adultery can be a crime.
The defense official on Mr. Panetta's plane said that General Allen, who is also married, told Pentagon officials that he had done nothing wrong. Neither he nor Ms. Kelley, who is also married with children, could be reached for comment early Tuesday. Mr. Panetta's statement praised General Allen for his leadership in Afghanistan and said, "He is entitled to due process in this matter."
A senior Defense Department official said General Allen had denied having an extramarital affair with Ms. Kelley. But the official said the content of some of the e-mails "was of a flirtatious nature."
"Some were of an affectionate nature," the official said, adding that it was unclear whether the flirtatiousness expressed was from General Allen to Ms. Kelley, from Ms. Kelley to General Allen, or mutual.
"That is what makes the e-mails potentially inappropriate," he said.
The official said that he had not read the e-mails, but had been briefed on the content, and that they did not contain anything inappropriate regarding operations or security.
But there were conflicting assessments of the content of the e-mails. Associates of General Allen said that the e-mails were of an innocuous nature. Some of the e-mails, these associates said, used terms of endearment, but not in a flirtatious way.
Pentagon officials cautioned against making too much of the number of documents, since some might be from e-mail chains, or brief messages printed out on a whole page.
The Pentagon inspector general's investigation opens up what could be a widening scandal into two of the most prominent generals of their generation: Mr. Petraeus, who was the top commander in Iraq and Afghanistan before he retired from the military and became director of the C.I.A., only to resign on Friday because of the affair, and General Allen, who also served in Iraq and now commands 68,000 American troops in Afghanistan.
Although General Allen will remain the commander in Afghanistan, Mr. Panetta said that he had asked President Obama to delay the general's nomination to be the commander of American forces in Europe and the supreme allied commander of NATO, two positions he was to move into after what was expected to be easy confirmation by the Senate. Mr. Panetta said in his statement that Mr. Obama agreed with his request.
Gen. Joseph A. Dunford, the assistant commandant of the Marine Corps, who was nominated last month by Mr. Obama to succeed General Allen in Afghanistan, will proceed as planned with his confirmation hearing. In his statement, Mr. Panetta urged the Senate to act promptly on his nomination.
The National Security Council spokesman, Tommy Vietor, said in a statement on Tuesday that Mr. Obama also believes that the Senate should swiftly confirm General Dunford.
The defense official said that the e-mails between Ms. Kelley and General Allen spanned the years 2010 to 2012. The official could not explain why there were so many pages of e-mails and did not specify their content. The official said he could not explain how the e-mails between Ms. Kelley and General Allen were related to the e-mails between Mr. Petraeus and Ms. Broadwell and e-mails between Ms. Broadwell and Ms. Kelley.
In what is known so far, Ms. Kelley went to the F.B.I. last summer after she was disturbed by harassing e-mails. The F.B.I. began an investigation and learned that the e-mails were from Ms. Broadwell. In the course of looking into Ms. Broadwell's e-mails, the F.B.I. discovered e-mails between Ms. Broadwell and Mr. Petraeus that indicated they were having an extramarital affair. Ms. Broadwell, officials say, saw Ms. Kelley as a rival for her affections with Mr. Petraeus.
The defense official said he did not know how General Allen and Ms. Kelley knew each other. General Allen has been in Afghanistan as the top American commander since July 2011, although before that he lived in Tampa as the deputy commander for Central Command, which oversees American military operations in the Middle East.
The defense official said that the Pentagon had received the 20,000 to 30,000 pages of documents from the F.B.I. and was currently reviewing them.
The defense official said that at 5 p.m. Washington time on Sunday Mr. Panetta was informed by the Pentagon's general counsel that the F.B.I. had the thousands of pages of e-mails between General Allen and Ms. Kelley. Mr. Panetta was at the time on his plane en route from San Francisco to Honolulu, his first stop on a weeklong trip to the Pacific and Asia. Mr. Panetta notified the White House and then the leaders of the Senate and House armed services committees.
General Allen is now in Washington for what was to be his confirmation hearing as commander in Europe. That hearing, the official said, will now be delayed.
After arriving in Perth Mr. Panetta and Secretary of State Hillary Rodham Clinton met with Prime Minister Julia Gillard of Australia for a United States-Australian security and diplomatic conference. Asked by a reporter while pausing for photos with Mrs. Clinton and Ms. Gillard if General Allen could remain an effective commander while under investigation, Mr. Panetta said nothing.
Gen. Martin E. Dempsey, the chairman of the Joint Chiefs of Staff, was also in Perth for the defense meetings and had no comment on the investigation of General Allen. "I do know him well and I can't say," General Dempsey said of General Allen late on Tuesday after returning from an official dinner with the Australian officials, Mrs. Clinton and Mr. Panetta.
Scott Shane and Thom Shanker contributed reporting from Washington.nation
This article originally appeared in The New York Times.