WASHINGTON (RNN) - Gen. David Petraeus, director of the CIA, has resigned from his post due to an extramarital affair.
Petraeus submitted his resignation to President Barack Obama on Thursday, he said in a letter directed to CIA personnel.
Obama formally accepted the resignation in a phone call on Friday afternoon, according to CNN.
The letter noted that Petraeus had exercised "extremely poor judgment" in conducting the affair. Petraeus and his wife, Holly Knowlton Petraeus, have been married almost four decades.
"After being married for over 37 years, I showed extremely poor judgment by engaging in an extramarital affair," the letter, obtained by NBC News, stated. "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."
In his letter, Petraeus stated it had been "the greatest of privileges" to serve with the agency. He called it "a work force that is truly exceptional in every regard."
Petraeus has been credited with the success of the troop "surge" in Iraq and served as commander of the coalition forces in 2007 and 2008.
Mike Morell is now acting director of the agency. He was sworn in as deputy director on May 6, 2010, under then-Director Leon Panetta.
Morell previously served as acting director from July through September 2011 with the departure of Panetta, the current Secretary of Defense. Morell has been a member of the CIA since 1980.
Obama said he was confident the CIA would move forward with the lead of Morell.
The president also praised Petraeus for his service to the country.
"As director of the Central Intelligence Agency, he has continued to serve with characteristic intellectual rigor, dedication, and patriotism," Obama said in a statement Friday. "By any measure, through his lifetime of service David Petraeus has made our country safer and stronger."
James Clapper, director of National Intelligence, issued a statement and called Petraeus one of the country's "greatest patriots" he had known in his five decades of service.
"Under his leadership, the CIA remained instrumental in providing our policy makers decision advantage through the best possible intelligence," Clapper stated. "I'm particularly thankful for Dave's unwavering support and personal commitment to my efforts to lead the intelligence community and integrate our intelligence enterprise."
The CIA has endured heavy criticism that it did not provide timely information to prevent the deadly Sept. 11 attack on the U.S. Consulate in Benghazi. Ambassador J. Christopher Stevens and three other Americans died in the attack.
CBS News correspondent Mark Knoller tweeted Petraeus would not testify at a closed hearing on the events in Benghazi scheduled for next week, the Senate Intelligence Committee announced.
Petraeus had reached the rank of four-star general in the U.S. Army before retiring and assuming the role of CIA director on Sept. 6, 2011.
He graduated from West Point Academy and holds a doctorate in international relations from Princeton. He served in the military from 1974 until he retired in 2011.
Holly Petraeus was also active in affairs dealing with the military. She became the director of the Better Business Bureau Military Line in 2005, working in consumer education and advocacy for service members and also working with the Treasury Department.
She was appointed to direct the Office of Servicemember Affairs in the Consumer Financial Protections Bureau in 2011.
The two met in 1973 at the U.S. Military Academy where Holly's father, William Knowlton, served as superintendent.
Copyright 2012 Raycom News Network. All rights reserved.