The Pentagon says the top American commander in Afghanistan, Gen. John Allen, is is under investigation for alleged "inappropriate" e-mail communications, and a senior defense official says there is a "distinct possibility" the matter is connected with the FBI investigation that led to the resignation of former CIA director David Petraeus. Defense Secretary Leon Panetta said in a written statement issued to reporters aboard his aircraft early Tuesday that the FBI referred the matter to the Pentagon on Sunday, and that he ordered a Pentagon investigation of Allen on Monday. The defense official confirmed the investigation was due to allegations of inappropriate emails between Allen and Jill Kelley, a close friend of the Petraeus family who reportedly led the FBI to investigate communications between Petraeus and his biographer Paula Broadwell. The FBI then discovered Petraeus and Broadwell had engaged in an extramarital affair, which led Petraeus to resign as director of the CIA on Nov. 9. The defense official says the investigation into Allen involves 20,000 to 30,000 emails that were dated between 2010 and 2012, and that the department is in the very early stages of their investigation .He would not say whether they involved sexual matters or whether they are thought to include unauthorized disclosures of classified information or any criminal activity. However, he said Allen's nomination to be the next commander of U.S. European Command and the commander of NATO forces in Europe has been put on hold "until the relevant facts are determined." 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. Meanwhile, Fox News also confirmed Monday night that the FBI is searching Broadwell's North Carolina home, though they did not say what they were doing there or what prompted the search. The Associated Press reports 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. 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, had complained about the emails in May to her friend, a FBI agent, who referred it to a cyber crimes unit. The Wall Street Journal first reported Monday that same agent was later taken off the case over concerns he was having an inappropriate relationship with Kelley. The agent now faces an internal investigation over his behavior, which reportedly included sending shirtless pictures of himself to Kelley over the summer. Sources told the Wall Street Journal that the agent, who has not been identified, appeared to become obsessed with the matter and then was prohibited from participating in the investigation. That would seem to coincide with reports that the first knowledge of the affair outside the FBI came from an agency whistle-blower who contacted a Capitol Hill Republican, who then told House Majority Leader Eric Cantor. 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. Kelley issued a statement through Smith and Company, a Washington communications and crisis management firm, before the Allen news broke, asking for privacy.