Updated 5:30 p.m. ET
CIA Deputy Director Michael Morell, who managed the resignation of CIA chief David Petraeus over an extramarital affair and defended the agency's performance over the attack on a U.S. diplomatic post in Benghazi, Libya, retired Wednesday.
"While I have given everything I have to the Central Intelligence Agency and its vital mission for a third of a century, it is now time for me to give everything I have to my family," Morell said in a statement released by the agency.
Morell retired after 33 years at the CIA, including two stints as acting director and one as deputy director. He was passed over for the top CIA spot by President Barack Obama in favor of the president's counterterrorism adviser, John Brennan, who announced Morrell's departure.
"I was most looking forward to ... the opportunity to work side-by-side once again with Michael Morell," said Brennan, noting that they'd begun their careers at the CIA in 1980. "As much as I would selfishly like to keep Michael right where he is for as long as possible, he has decided to retire to spend more time with his family and to pursue other professional opportunities."
Brennan said Morell will be replaced by Avril Haines, the first woman to hold that position. Haines has been a White House deputy assistant and deputy counsel for national security affairs since 2010. Before that, she was assistant legal adviser for treaty affairs at the State Department, according to a White House statement.
Obama said Morell has been appointed to the President's Intelligence Advisory Board, a body of mostly retired people who help advise the White House on intelligence policy.
During the latter years of his career, Morell drew criticism for stating that the CIA's interrogation program produced some useful information. The CIA is reviewing a lengthy, still-classified Senate Intelligence Committee report that says techniques like waterboarding produced.
Morell also made the final edit onon the Libya attack, deleting references to the CIA warning the State Department of previous militant attacks in Benghazi.