Deputy Director of the Central Intelligence Agency (CIA) Michael Morrell said Wednesday that he will retire in August and a White House legal adviser said that he will be replaced by Avril Haines. Morell stood in as head of the CIA following the sudden resignation last year of director David Petraeus. President Barack Obama had nominated Haines in April as the State Department's legal adviser; however, when Morell decided to retire, Haines became the top candidate to replace him, according to a White House official, who spoke to the press under the condition of anonymity. Haines, current deputy assistant to the president and legal adviser to the National Security Council, has participated in most key meetings of top administration officials and has also chaired a legal committee which reviews the CIA's most sensitive activities, the CIA said in a statement. "Director (John) Brennan considered a number of candidates and concluded that the Agency would be best served with Avril serving as its Deputy Director," the White House official said. Morell is a veteran of the CIA's analytical division and had worked at the agency for 33 years. The White House said that Morell will join the President's Intelligence Advisory Board.