David Petraeus has resigned as director of the CIA after admitting he had an extra-marital affair.
According to his letter of resignation, Mr Petraeus asked US President Barack Obama on Thursday to allow him to resign, and on Friday the president accepted.
Mr Petraeus said in a statement that he had shown "extremely poor judgment" in having an affair.
Mr Petraeus has been married for 37 years to Holly Petraeus, whom he met when he was a cadet at the US Military Academy at West Point, New York state.
The retired four-star general led the military campaigns in Iraq and Afghanistan, then took the helm of the Central Intelligence Agency in September 2011.