WASHINGTON -- David Petraeus, the retired four-star general renowned for taking charge of the military campaigns in Iraq and then Afghanistan, abruptly resigned Friday as director of the CIA, admitting to an extramarital affair.
The affair was discovered during an FBI investigation, according to officials briefed on the developments. They spoke on condition of anonymity because they were not authorized to publicly discuss the matter.
Mr. Petraeus carried on the affair with his biographer and reserve Army officer Paula Broadwell, according to several U.S. officials with knowledge of the situation. They spoke anonymously because they were not authorized to discuss publicly the investigation that led to the resignation.
The FBI discovered the relationship by monitoring Mr. Petraeus' emails, after being alerted Ms. Broadwell may have had access to his personal email account, two of the officials said.
Ms. Broadwell did not respond to voice mail or email messages seeking comment.
Mr. Petraeus' resignation shocked Washington's intelligence and political communities. It was a sudden end to the public career of the best-known general of the post 9/11 wars, a man sometimes mentioned as a potential Republican presidential candidate. His service was effusively praised Friday in statements from lawmakers of both parties.
Mr. Petraeus, who turned 60 on Wednesday, told CIA employees in a statement that he had met with President Barack Obama at the White House on Thursday and asked to be allowed to resign. On Friday, the president accepted.
Mr. Petraeus told his staffers he was guilty of "extremely poor judgment" in the affair. "Such behavior is unacceptable, both as a husband and as the leader of an organization such as ours."
He has been married for 38 years to Holly Petraeus, whom he met when he was a cadet at the U.S. Military Academy at West Point, N.Y. She was the daughter of the academy superintendent. They have two children, and their son led an infantry platoon in Afghanistan.
Mr. Obama said in a statement that the retired general had provided "extraordinary service to the United States for decades" and had given a lifetime of service that "made our country safer and stronger." Mr. Obama called him "one of the outstanding general officers of his generation."
The president said that CIA Deputy Director Michael Morell would serve as acting director. Mr. Morell was the key CIA aide in the White House to President George W. Bush during the Sept. 11, 2001, terror attacks.
"I am completely confident that the CIA will continue to thrive and carry out its essential mission," Mr. Obama said.
Administration officials said the White House was first notified about the Petraeus affair on Wednesday. Mr. Obama, who returned to the White House that evening after spending Election Day in Chicago, wasn't informed until Thursday morning.
The Senate and House intelligence committees were briefed on Mr. Petraeus' resignation only after the news was reported in the media, said a congressional staffer, speaking anonymously because the staffer was not authorized to publicly discuss the briefings.
The resignation comes at a sensitive time. The administration and the CIA have struggled to defend security and intelligence lapses before the attack that killed the U.S. ambassador to Libya and three others. It was an issue during the presidential campaign that ended with Mr. Obama's re-election Tuesday.
The CIA has come under intense scrutiny for providing the White House and other administration officials with talking points that led them to say the Benghazi attack was a result of a film protest, not a militant terror attack. It has become clear that the CIA was aware the attack was distinct from the film protests roiling across other parts of the Muslim world.
Mr. Morell rather than Mr. Petraeus now is expected to testify at closed congressional briefings next week on the Sept. 11 attacks on the consulate in Benghazi.
For the director of the CIA, being engaged in an extramarital affair is considered a serious breach of security and a counterintelligence threat. If a foreign government had learned of the affair, the reasoning goes, Mr. Petraeus or Ms. Broadwell could have been blackmailed or otherwise compromised. Military justice considers conduct such as an extramarital affair to be possible grounds for court-martial.
Failure to resign also could create the perception for the rank and file that such behavior is acceptable.
Holly Petraeus is known for her work helping military families. She joined the new Consumer Financial Protection Bureau to set up an office dedicated to helping service members with financial issues.
Though Mr. Obama made no direct mention of Petraeus' reason for resigning, he offered his thoughts and prayers to the general and his wife, saying that Holly Petraeus had "done so much to help military families through her own work. I wish them the very best at this difficult time."
Mr. Petraeus, who became CIA director in September 2011, was known as a shrewd thinker and hard-charging competitor.
Before Mr. Obama brought Mr. Petraeus to the CIA, the general was credited with salvaging the U.S. war in Iraq.
President George W. Bush sent Mr. Petraeus to Iraq in February 2007, at the peak of sectarian violence, to turn things around as head of U.S. forces. He oversaw an influx of 30,000 U.S. troops and moved troops out of big bases so they could work more closely with Iraqi forces scattered throughout Baghdad.
Mr. Petraeus' success was credited with paving the way for the eventual U.S. withdrawal.
After Iraq, Mr. Bush made Mr. Petraeus commander of U.S. Central Command, overseeing all U.S. military operations in the greater Middle East, including Afghanistan and Pakistan.
When the top U.S. commander in Afghanistan, Gen. Stanley McChrystal, was relieved of duty in June 2010 for comments in a magazine story, Mr. Obama asked Mr. Petraeus to take over in Kabul and the general quickly agreed.nation