The Senate voted unanimously on Wednesday to confirm Gen. David Petraeus as the next commander of U.S. forces in Afghanistan.

All senators in both parties voted overwhelmingly to install Petraeus in the new role, filling the role of resigned Gen. Stanley McChrystal.

Petraeus was confirmed 99-0. The missing vote was the late Sen. Robert Byrd (D-W.Va.), who died Monday.

President Barack ObamaBarack Hussein ObamaScarborough: Media 'parroting' Trump economy when Obama's 'was much stronger' Trump rejects Obama taking credit for strong economy On The Trail: Democrats plan to hammer Trump on Social Security, Medicare MORE named Petraeus, who led counterinsurgency efforts in Iraq and was serving as director of U.S. Central Command (CENTCOM), to his new post last week after McChrystal resigned over an uproar caused by a Rolling Stone magazine article.

The move was quickly praised by leaders in both parties. Sen. John McCainJohn Sidney McCainEleventh Democratic presidential debate to be held in Phoenix Moderate Democrats now in a race against the clock Biden on Graham's push for investigation: 'I don't know what happened' to him MORE (R-Ariz.), the ranking member of the Senate Armed Services Committee, predicted Petraeus would have one of the shortest confirmations in Senate history. That proved true, as the general testified and was voted out of the committee on Tuesday and then confirmed by the full Senate Wednesday.  

Obama praised the Senate for its quick action.


"The Senate's quick action and General Petraeus's unrivaled experience will ensure we do not miss a beat in our strategy to break the Taliban's momentum and build Afghan capacity," he said in a statement.

Petraeus's nomination was all but assured, and one senator, Roger WickerRoger Frederick WickerThe Hill's Morning Report - Sanders repeats with NH primary win, but with narrower victory Senators press NCAA on compensation for college athletes Overnight Defense: Inside Trump's 4B Pentagon budget | Highlights include .4B for Space Force, preview of Air Force One paint job | Senate eyes Wednesday debate on Iran war powers | 109 US troops diagnosed with brain injuries from attack MORE (R-Miss.), suggested Tuesday on MSNBC the general could have passed that afternoon with a unanimous consent agreement.

The roll call vote has the effect of putting each senator on record in support of Petraeus's new role in Afghanistan.

There was some speculation that Sen. Russ Feingold (D-Wis.), a skeptic of U.S. strategy in Afghanistan, might vote against confirmation for Petraeus, but he ultimately joined with fellow Democrats in support of the appointment.

-- Sam Youngman contributed to this post.

-- This post was updated at 2:11 p.m.