David Petraeus has resigned as the director of US intelligence agency the CIA after admitting he had an extra-marital affair.
According to his letter of resignation, Mr Petraeus asked US president Barack Obama to allow him to resign yesterday, and today the president accepted.
Mr Petraeus said in a statement that he had shown “extremely poor judgment” in having an affair.
Mr Petraeus, a highly decorated former combat commander, said earlier in a message to the CIA workforce that he was stepping down because of an extra-marital 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.
"I am completely confident that the CIA will continue to thrive and carry out its essential mission, and I have the utmost confidence in acting director Michael Morell," Mr Obama said in a written statement.
Mr Obama said his thoughts and prayers were with Mr Petraeus and his wife. "I wish them the very best at this difficult time," he said.