The U.S. Senate voted 94-0 Thursday to confirm Gen. David Petraeus as the next director of the CIA, a post left vacant by Leon Panetta's appointment as secretary of defense.

A veteran of more than 37 years in the U.S. Army, Petraeus has been serving for the past year as commander of international forces in Afghanistan.

"His military service will come in handy. I think his analytical skills and ability will come in handy. He is the right man for the job," the Senate Intelligence Committee chair, Sen. Dianne Feinstein (D-Calif.), said before Thursday's vote.

The 58-year-old Petraeus says he plans to formally retire from the Army before taking up the CIA post in September, but will remain in Afghanistan for now to oversee the first phase of a planned withdrawal of 33,000 U.S. troops.

President Barack Obama's strategy calls for the troops to be pulled out in stages between now and September 2012. The drawdown will still leave some 70,000 U.S. military personnel in Afghanistan.

Petraeus' previous assignments include directing U.S. forces in Iraq and heading Central Command.

The overhaul of the national security team was spurred by Robert Gates' decision to retire as defense secretary.

Gates, who was appointed in 2006 by President George W. Bush, agreed to continue serving as part of the Obama administration with the proviso that he would step down before the end of the four-year term.