Updated

American commander in Afghanistan Gen. John Allen, facing an internal investigation for "inappropriate communications" with a woman at the heart of the David Petraeus controversy, engaged in much more than "flirtatious" behavior, sources tell Fox News -- with one official even likening the email exchanges to "phone sex."

The investigation focuses on emails between Allen and Jill Kelley, a close friend of the Petraeus family. Kelley was the woman who originally notified the FBI when she received threatening emails from Petraeus' mistress Paula Broadwell -- and that investigation later uncovered the affair.

One senior defense official initially described the nature of the communications between Allen and Kelley as "flirtatious." However, two U.S. officials later told Fox News that Allen's contact with Kelley was more than just general flirting. One official described some of the emails as sexually explicit and the “equivalent of phone sex over email.”

Another official said Panetta would not have referred this matter to an internal investigator without knowing the devastating impact this would have on war efforts and on Allen and his family.

"This was a serious enough matter that those who examined the emails thought it should be referred to the secretary of defense, and the secretary made the decision to turn it over to the inspector general," the official said. "He would not have thrust this into the limelight without good cause."

More On This...

Pentagon spokesman George Little declined to comment on the nature of the communications, citing the pending investigation.

Sources said officials are reviewing 20,000 to 30,000 pages of documents -- mostly emails -- between 2010 and 2012. One official would only say "there is the distinct possibility" this case is connected to the Petraeus investigation.

That investigation, it appears, it still ongoing. FBI agents on Monday conducted a search of Broadwell's home in Charlotte, N.C.  FBI agents appeared at Broadwell's home carrying the kinds of cardboard boxes often used for evidence gathering during a search. They walked through the open garage of Broadwell's house and knocked at a side door before entering the home, but refused to talk to the media.

Further, Fox News confirms that the FBI agent who originally spurred the Petraeus investigation was taken off the case because authorities grew concerned about his relationship with Kelley. Kelley had alerted this agent to her concerns about the harassing emails from the start, but the agent was removed from the case over the summer because of his behavior, which included sending shirtless photos of himself to Kelley. He now faces an internal investigation.

As for Allen, for now he will remain the head of U.S. and NATO forces in Afghanistan. However, Defense Secretary Leon Panetta has referred the case to the Pentagon's inspector general's office for investigation. For the time being, Allen's nomination to be commander of U.S. European Command and commander of NATO forces in Europe is on hold. Allen was scheduled to have a nomination hearing for that position Thursday and had been expected to take that new post in early 2013, if confirmed by the Senate, as had been widely expected.

The senior defense official who described the case would not say whether the communications between Allen and Kelley involved sexual matters or whether they are thought to include unauthorized disclosures of classified information or any criminal activity. 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.

Panetta also said he wants the Senate Armed Services Committee to act promptly on Obama's nomination of Gen. Joseph Dunford to succeed Allen as commander in Afghanistan. That nomination was made several weeks ago. Dunford's hearing is also scheduled for Thursday.

The revelations about Allen are the latest twist in a scandal that has captivated the American public since Petraeus abruptly resigned.

Fox News confirmed Sunday that the investigation that led to Petraeus' resignation started when Kelley, 37, alerted the FBI about harassing emails, which appeared to be an attempt to blackmail Petraeus, sources said. It was widely reported that Broadwell was behind the emails, but early indications suggested that they might not have come from her.

However, Fox News confirmed Monday from multiple law enforcement sources that the emails came from multiple dummy accounts, which were traced back to Broadwell. The reason the FBI had jurisdiction is because cyber-harassment is a federal crime, and once the FBI got to Broadwell they uncovered the affair.

Kelley, a Tampa, Fla., resident who is married with three children, and sister Natalie are close friends of the Petraeus' and spent holidays together. Sources close to the family told Fox News she was not having an affair with Petraeus.

Kelley 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 issued a statement through Smith and Company, a Washington communications and crisis management firm, before the Allen news broke, asking for privacy. She said she respects Petraeus' privacy and wants the same for her own family.

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

Allen was Deputy Commander of Central Command, based in Tampa, prior to taking over in Afghanistan. He also is a veteran of the Iraq war.

The Associated Press contributed to this report.