CIA chief Petraeus steps down, having failed to keep his drone in his pants

David H. Petraeus, the head of America's Central Intelligence Agency, resigned just days after the election after issuing a statement saying he had engaged in an extramarital affair.

"By acknowleding an extramarital affair, Mr. Petraeus, 60, was confronting a sensitive issue for a spy chief," reports the New York Times. "Intelligence agencies are often concerned about the possibility that agents who engage in such behavior could be blackmailed for information."

In an email to Wired's national security blog Danger Room, a former confidant says of the disgraced general, "He feels that he screwed up. He did a dishonorable thing and needed to try to do the honorable thing." The source says the affair began after Petraeus retired from the military and became CIA director.

Petraeus is a retired four-star U.S. Army general, and was once considered a possible presidential candidate. He has been married to Holly Petraeus, an assistant director of the U.S. Consumer Financial Protection Bureau, for 37 years.

Paula Broadwell, the author of Petraeus' biography, "All In," is now under investigation by the FBI: her role gave her access to his email, and to the the general in person in Afghanistan.

Petraeus was due to testify in Washington about Benghazi next week. Some are questioning the timing of his resignation, believing that it is political in nature: did the White House stall the bad news until the election was won? Is there a Libya connection?

The woman with whom he had the affair has not been identified. Update: The woman with whom he had the affair has been identified as the aforementioned biographer Paula Broadwell, who was, uh, embedded with him in Afghanistan.

Greg Miller, intelligence reporter for the Washington Post, tweets: "Officials confirm Petraeus affair surfaced during FBI probe of his email. He called [National Security Advisor Thomas] Donilon Thursday asking for time with the president."

Just last week, the Daily Beast published an excerpt from Broadwell's book. The excerpt was titled, "General David Petraeus's Rules for Living." Among those rules:

We all will make mistakes. The key is to recognize them and admit them, to learn from them, and to take off the rear­ view mirrors—drive on and avoid making them again.

Michael J. Morell, the CIA's deputy director, will take over as acting director. The account at Danger Room is worth reading for a deeper look.