The director of the Central Intelligence Agency (CIA), General David Petraeus tendered his resignation as head of the leading U.S. spy agency on Friday, admitting that he had engaged in an extra-marital affair and acknowledging he "showed extremely poor judgement".
In a letter to the CIA workforce, the 60-year-old said he met with President Barack Obama at the White House on Thursday and asked "to be allowed, for personal reasons, to resign from my position."
Obama, who was re-elected to a second term on Tuesday, said in a statement he had accepted Petraeus' resignation.
He praised his work at the CIA and for leading U.S. troops in Iraq and Afghanistan, before declaring he was "confident the CIA would continue to thrive".
The woman with whom the former CIA director had the affair with is Paula Broadwell, according to a person familiar with the matter, Reuters reports.
She is an author and Petraeus' biogapher - who released a book in January of this year entitled titled "All In".
On Friday night, there were indications that the affair was first uncovered a few months ago during an investigation by the FBI.
A U.S. national security source said the FBI had stumbled across evidence of Petraeus' affair during an apparently unrelated investigation of news leaks.
Petraeus' revelation of the affair has appeared to mark the end of a public career which is widely admired.
The warrior-scholar who played a key role in the Iraq war, led the U.S. Central Command and commanded U.S. and NATO troops in Afghanistan.
Petraeus' name had circulated speculatively as a possible Republican presidential nominee before Obama secured him as CIA chief. Before taking the CIA post, he retired as an Army general after nearly four decades of military service.
Petraeus led the CIA for only 14 months.
There is no indication Petraeus broke any agency rule in connection with his admitted affair, sources familiar with the matter said. The CIA has no broad rule banning officials from engaging in extramarital affairs though, if discovered, liaisons by CIA personnel with suspected foreign agents would pose security problems for a U.S. agent.
Michael Morell, the agency's long-time deputy director, will serve as acting CIA chief.
Petraeus' wife, Holly, has been an advocate for U.S. veterans and head of the Office of Service member Affairs at the U.S. Consumer Financial Protection Bureau.