General David Petraeus, the director of the Central Intelligence Agency, resigned today, citing a recent extramarital affair. President Obama, elected to a second term just days earlier, accepted Petraeus's resignation and praised his leadership and service to his country.

A longtime veteran of the Army and a four-star general, Petraeus quickly resigned "for personal reasons." Intelligence agents who engage in such behavior as an affair can be susceptible to blackmail. Gen. Petraeus said this in a statement:

After being married for over 37 years, I showed extremely poor judgment by engaging in an extramarital affair. Such behavior is unacceptable, both as a husband and as the leader of an organization such as ours. This afternoon, the president graciously accepted my resignation.

Petraeus's position will be filled by the deputy director, Mike Morell, who also held the post briefly when the previous CIA director, Leon Panetta, stepped down to become the secretary of defense. The general is widely known for leading the so-called surge in Iraq in 2007 and then taking over the war in Afghanistan before ending his 37-year Army career to head the CIA.

UPDATE: The woman with whom Petraeus, 60, was having the affair, Paula Broadwell, wrote a glowing biography of him called "All In: The Education of General David Petraeus" that came out in January 2012. Broadwell, 40, is also married. The FBI discovered the affair during the course of an investigation into harassing emails sent by Broadwell to a third party.

More From 96.1 The Eagle