Petraeus, currently top commander of U.S. and NATO forces in Afghanistan, is expected to assume the new post in September.

On the Senate floor Thursday, lawmakers lavished praise on Petraeus, describing him as a brilliant tactician whose leadership helped turn the tide against insurgents in Iraq and has helped U.S. and allied forces make considerable gains in Afghanistan.

“At the CIA, he’ll have a chance to take the fight to the enemy in a different way,” said Sen. Lindsay O. Graham (R-S.C.), noting that U.S. intelligence in Afghanistan will play an increasingly important role there as U.S. troops are withdrawn.

Petraeus, said Sen. John McCain (R-Ariz.), will “provide our nation with the very best strategy, tactics, thought and action to keep our nation safe.”

The general’s nomination was approved by a 94 to 0 vote.

On Tuesday, the Senate unanimously confirmed outgoing CIA Director Leon Panetta as the new secretary of defense. The agency’s deputy director, Michael J. Morell, is expected to serve as interim director until Petraeus’s arrival.