General John Allen was placed under investigation after FBI agents probing email threats sent by Petraeus' mistress stumbled upon a vast trove of messages Allen sent to another married woman at the heart of the scandal.
According to a senior Pentagon official, the married general denies any sexual liaison with 37-year-old Tampa socialite Jill Kelley, but the "sheer volume" of correspondence could amount to "conduct unbecoming an officer."
Due to face lawmakers this week for a hearing to confirm his promotion to the post of NATO's supreme commander in Europe, Allen will now return to Kabul and remain in charge of allied forces in Afghanistan until the probe is over.
"The president thinks very highly of General Allen and of his service to his country, as well as the job he has done in Afghanistan," White House spokesman Jay Carney told reporters.
"He has faith in General Allen," Carney said, adding that the White House had known about the Allen strand to the investigation since Friday.
Defense Secretary Leon Panetta, currently on an official visit to Australia, on Wednesday urged against jumping to any conclusions about Allen and said the general has his "continued confidence."
Petraeus resigned last week when it became clear that his affair with 40-year-old military reservist Paula Broadwell, who wrote a fawning biography of him, would become public.
FBI agents stumbled on the liaison after a complaint from Kelley -- a close friend of both Petraeus and Allen -- who told a federal agent that she had received threatening emails.
Investigators traced the mails to Broadwell's account and discovered that she had been in an extramarital relationship with Petraeus.
The threatening emails she had sent to Kelley -- who told investigators she did not know Broadwell -- suggest the biographer was jealous of the socialite's rapport with the generals at US Central Command in Florida.
The Wall Street Journal said Broadwell had sent a series of critical emails about Kelley to senior generals under the pseudonym KelleyPatrol, including one to Allen in which she called Kelley a "seductress."
FBI agents have also discovered that Allen sent a huge number of emails to Kelley, triggering an investigation into whether he had broken the law or any military regulations.
In all, the FBI is investigating between 20,000 to 30,000 pages of Allen's correspondence, a Pentagon official told reporters. The Washington Post said this represented between 200 and 300 emails between the pair.
A Pentagon official said some of the emails were seen as "flirtatious" but that only an investigation could determine if rules were broken.
"'Flirtatious' can cover everything from something fairly innocuous all the way over to sexting or something on those lines. It's a broad term," the official said.
Petraeus and Broadwell were interviewed separately by investigators in late October and early November and both admitted to the affair, which the retired four-star general told friends he ended about "four months ago."
Petraeus reportedly planned to remain in office and tough it out until last week, when the realization that the scandal was about to go public prompted him to offer Obama his shock resignation.
The general had been due to testify to Congress this week on the September 11 assault in Benghazi, Libya that killed four Americans, including US ambassador Chris Stevens and two former Navy SEALs working for the CIA.
Democratic Senator Dianne Feinstein told CNN she expected Petraeus would still agree to testify at a later date, adding that she had seen nothing to link the sex scandal to Benghazi.
The Kelley inquiry comes at a sensitive time for Allen and the Pentagon, who are preparing their recommendations to the White House on the number of US troops to keep in Afghanistan until 2014.
Petraeus took command of the CIA 14 months ago, retiring from the military after a storied career that saw him lead the 101st Airborne, the US war in Iraq, its CENTCOM regional command and international forces in Afghanistan.
The general, who presided over the 2007 troop "surge" in Iraq, is widely credited with turning the tide of the US war there, though similar efforts have been less successful in Afghanistan.
On Monday, FBI agents searched Broadwell's North Carolina home, removing bags, boxes and pictures, local media reported. The mother of two has not been seen at her home since Petraeus resigned over the affair.
CNN, citing an unnamed source, reported Tuesday that agents wanted to see historical documents that Broadwell had been storing for Petraeus.
Broadwell has hired renowned Washington power attorney Robert Muse to represent her, although no criminal charges have been filed.
The Federal Bureau of Investigation has also come under scrutiny.
The Wall Street Journal reported that the FBI agent Kelley contacted about the threatening emails, a personal acquaintance of hers, brought the matter to the attention of Republican lawmakers.
The agent apparently believed the bureau was not moving aggressively enough with the investigation, suspecting that his superiors were keen to protect the Democratic president from the fallout.
FBI supervisors had earlier thrown the agent off the case after he became "obsessed" with the matter, the Journal said.
It quoted one official as saying the agent had sent shirtless photos to the Kelley and was currently under investigation by the internal affairs arm of the FBI.