CIA Deputy Director Michael Morell is stepping down from his post and will be replaced by White House lawyer Avril Haines, the agency announced Wednesday.

CIA Deputy Director Resigning, Being Replaced by White House Lawyer

Then-acting CIA Director Michael Morell walks in the hallway of the Capitol building in Washington, Wednesday, Nov. 28, 2012. Morrell said Wednesday he plans to resign his post as deputy director to spend more time with his family. (AP)

CIA Director John Brennan said in a statement that Morell, a 33-year agency veteran, had decided to “retire to spend more time with his family and to pursue other professional opportunities.”

“[I]t is difficult for me to imagine CIA without Michael’s exceptionally sharp mind, tremendous energy, and absolute dedication to mission. But I am comforted by the fact that Michael will be able to spend more time with his wonderful family,” Brennan said.

Morell served twice as CIA acting director — most recently after David Petraeus resigned his post in November — but was passed over for the top job when President Barack Obama nominated Brennan, formerly his counterterrorism adviser, earlier this year.

Morell’s name surfaced in connection with removing references to terrorism warnings from United Nations Ambassador Susan Rice’s widely-discredited Benghazi talking points.

He told The Washington Post he made the decision to step down last month. His last day will be Aug. 9.

“Whenever someone involved in the rough and tumble of Washington decides to move on, there is speculation in various quarters about the ‘real reason,’” Morell said in a CIA statement. “But when I say that it is time for my family, nothing could be more real than that.”

Haines is currently a deputy assistant to the president and deputy counsel to the president for national security affairs. Obama had previously announced his intention to nominate her to be legal adviser to the State Department just in April.

This post has been updated.