Updated

The Senate has voted for a sweeping, $631 billion defense bill that calls for accelerating the withdrawal of U.S. forces from Afghanistan and tightens sanctions on Iran.

The vote was 98-0. The legislation would authorize money for weapons, aircraft and ships and provide a 1.7 percent pay raise for military personnel.

After a decade of increasing Pentagon budgets, the vote came against the backdrop of significant reductions in projected military spending and the threat of deeper cuts from the so-called fiscal cliff of automatic reductions.

The Obama administration has threatened to veto the measure, citing limits on the president's authority to handle terror suspects.

The Senate must reconcile its version with the House of Representatives' legislation passed in May. Lawmakers have just a few weeks to produce a final bill.

Arizona Republican Sen. John McCain added an amendment to require a report on possible military actions that could be used in Syria.