(CNN) The House passed a massive annual defense spending bill Friday after some uncertainty over whether Democrats could get the bill across the finish line.

The vote was 220-197. Eight Democrats voted against the bill, and no Republicans supported it.

"This legislation keeps America strong with vital action to improve the economic security and well-being of our service members and families, including a much-needed pay raise," House Speaker Nancy Pelosi said on the floor in support of the bill.

The $733 billion package, known as the annual National Defense Authorization Act, falls short of the President's request for $750 billion, a level that has already passed the Senate in its version.

Progressives threatened to take down the measure over opposition to the top line number and other provisions. Democratic leaders allowed votes on a number of key amendments lobbied for by progressives. Among them were two significant proposed policy shifts that were adopted, including a bipartisan ban on using funds to go to war with Iran without congressional approval and a repeal of the 2001 Authorization for Use of Military Force

Read More