Retired Gen. David Petraeus resigned Friday as CIA director after acknowledging that he had an extramarital affair.
President Barack Obama accepted the resignation and named Petraeus's deputy, Michael Morell, as acting director of the spy agency.
In his letter of resignation, Petraeus said he has been married for 37 years and that being unfaithful to his wife showed "extremely poor judgment" and behaviour that "is unacceptable, both as a husband and as the leader of an organization such as ours".
Petraeus, 60, was named in April 2011 to succeed current Defense Secretary Leon Panetta as head of the CIA, and took office 14 months ago after his return from Afghanistan, where he commanded the NATO-led International Security Assistance Force.
He had previously been the top US military leader of the multinational force in Iraq from January 2007 until September 2008.
In that position he designed the surge strategy that many credited with lowering the rate of violence in the Arab country.
Between October 2008 and June 2010, Petraeus headed the US military's Central Command.