The US Senate has confirmed the appointment of General Michael Hayden as the head of the CIA.
Gen Hayden's confirmation was welcomed by President Bush
Gen Hayden, approved by 78 votes to 15, is the first active or retired military officer to head the CIA in 25 years.
Gen Hayden, President Bush's nominee for the post, replaces Porter Goss, who resigned earlier this month.
Critics have questioned putting a military man in charge but Gen Hayden says that he will remain independent of the Pentagon.
Gen Hayden, 61, a four-star general, has been the leading deputy to National Intelligence Director John Negroponte.
President George W Bush welcomed the confirmation.
"Winning the war on terror requires that America have the best intelligence possible, and his strong leadership will ensure that we do," he said in a statement.
"Gen Hayden is a patriot and a dedicated public servant whose broad experience, dedication and expertise make him the right person to lead the CIA at this critical time."
The BBC's Adam Brookes in Washington says the confirmation process has been quick and easy.
He says Gen Hayden has mainly sidestepped the controversy that surrounded a programme of electronic surveillance run inside the US that he oversaw as head of the National Security Agency from 1999 to 2005.
The agency's eavesdropping programme monitored phone calls and e-mails of US citizens without warrants as part of the Bush administration's war on terror.
Some Democrats had expressed concern over the programme.
Bush called Hayden a "patriot and a dedicated public servant"
Sen Ron Wyden said at Thursday's Senate debate there were "serious questions about whether the general will continue to be an administration cheerleader, serious questions about his credibility".
But Senate Intelligence Committee Chairman Pat Roberts said Gen Hayden was "the right choice to lead the CIA".
The previous head, Mr Goss, resigned after reported disagreements with Mr Negroponte over the future of the agency.
The resignation of Mr Goss, who had been CIA director less than two years, came as a surprise.
The White House denied as "categorically untrue" US media reports that the president had lost confidence in Mr Goss.
Our correspondent says Gen Hayden's greatest challenge will be to rebuild confidence in the CIA's ability to gather accurate intelligence.
The 11 September attacks and the failure to find the much-touted weapons of mass destruction in Iraq have eroded the public sense that the intelligence agencies are effective.
Morale at the agency is said to be low, our correspondent says, and investigations into leaks and corruption are continuing.
He says Gen Hayden's most pressing task will be to keep the CIA where it believes it belongs - in the shadows and not in the newspapers.