CIA Director David Petraeus resigned Friday, citing an extramarital affair and “extremely poor judgement.”

In a letter released to the CIA work force on Friday afternoon, Petraeus disclosed the affair, and wrote: “Such behavior is unacceptable, both as a husband and as the leader of an organization such as ours.”

President Obama “graciously accepted my resignation,” he wrote.

Petraeus was appointed CIA director in April 2011, replacing Leon Panetta, who moved to the Pentagon to become defense secretary.

Petraeus served as commander of the war in Afghanistan in 2010-2011. Because of that role, he was seen as bringing a “customer’s eye” to the intelligence job. Before that, he served as commander of the U.S. Central Command and as the commanding general of U.S. forces in Iraq.

Multiple sources tell NBC News that Mike Morrell, the deputy CIA director and a longtime CIA officer, would likely be offered the job as acting director but with the understanding that he may be elevated to the job permanently at some point.

That’s how George Tenet got the job, first as deputy director in July 1995, then acting director following the resignation of John Deutch in December 1996 and finally as director in July 1997, staying on in the Bush Administration.

Click here to read more.