"Such behavior is unacceptable, both as a husband and as the leader of an organization such as ours," the retired general said. He has been married for 38 years to Holly Petraeus, whom he met when he was a cadet at the U.S. Military Academy at West Point, N.Y. She was the daughter of the academy superintendent.
Obama said in a statement that the general had provided "extraordinary service to the United States for decades" and had given a lifetime of service that "made our country safer and stronger." Obama called him "one of the outstanding general officers of his generation."
Obama said that CIA Deputy Director Michael Morell would serve as acting director.
For the director of the CIA, being engaged in an extramarital affair is considered a serious breach of security and a counterintelligence threat. If a foreign government had learned of the affair, the reasoning goes, Petraeus or the person with whom he was involved could have been blackmailed. Military justice considers conduct such as an extramarital affair to be possible grounds for court martial.
Mrs. Petraeus is known for helping military families. She joined the new Consumer Financial Protection Bureau to set up an office dedicated to helping service members with financial issues.
Altthough Obama made no direct mention of Petraeus' reason for resigning, he said he offered his thoughts and prayers to the general and his wife, saying that Holly Petraeus had "done so much to help military families through her own work. I wish them the very best at this difficult time."
Before Obama brought Petraeus to the CIA, he was credited with salvaging the U.S. war in Iraq.
"His inspirational leadership and his genius were directly responsible, after years of failure, for the success of the surge in Iraq," Sen. John McCain, R-Ariz., said Friday.