Citing affair, Petraeus resigns at CIA

David Petraeus resigned his post as director of the Central Intelligence Agency on Friday, citing an extramarital affair.

Petraeus visited the White House on Thursday to ask President Barack Obama to accept his resignation “for personal reasons,” he said in a statement to CIA staff. “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.”

The FBI is investigating Paula Broadwell, author of the biography “All In: The Education of General David Petraeus,” for improperly attempting to access his email, law enforcement officials tell NBC News.

An intelligence source confirms to POLITICO that the FBI had been investigating Petraeus after accidentally learning of the affair. He was pushed to exit before it all came out in detail.

“Director Petraeus was encouraged to get ahead of it and take control of the situation because it would eventually come out,” the source said.

A White House official told POLITICO that the White House was informed of the issue Wednesday, and Obama was told Thursday.

“The president met with General Petraeus yesterday. In that meeting, Petraeus offered his resignation and explained the circumstances behind it,” the official said. “The president accepted [Petraeus’s] resignation in a phone call this afternoon.”

The resignation comes as the intelligence community remains under pressure over the attack in Benghazi that killed Ambassador Chris Stevens and three others. Petraeus was slated to testify next Thursday at a closed Senate Intelligence Committee hearing on Benghazi.

In a statement, Obama said he accepted Petraeus’s resignation and expressed confidence in Michael Morell, the agency’s deputy director, to take over as acting director. Morell will testify in Petraeus’s place next week.

Petraeus “provided extraordinary service to the United States for decades,” Obama said. “By any measure, he was one of the outstanding General officers of his generation, helping our military adapt to new challenges, and leading our men and women in uniform through a remarkable period of service in Iraq and Afghanistan, where he helped our nation put those wars on a path to a responsible end. As Director of the Central Intelligence Agency, he has continued to serve with characteristic intellectual rigor, dedication, and patriotism.

“By any measure, through his lifetime of service David Petraeus has made our country safer and stronger,” Obama said.

"Going forward, my thoughts and prayers are with Dave and Holly Petraeus, who has done so much to help military families through her own work. I wish them the very best at this difficult time,” Obama said.

“As I depart Langley, I want you to know that it has been the greatest of privileges to have served with you, the officers of our Nation’s Silent Service, a work force that is truly exceptional in every regard,” Petraeus said in his statement to CIA staff. “Indeed, you did extraordinary work on a host of critical missions during my time as director, and I am deeply grateful to you for that.”