CNN  — 

The Senate voted overwhelmingly on Friday to approve a sweeping defense bill with a veto-proof majority, a major rebuke to President Donald Trump who has urged Republican opposition and threatened to veto the legislation. The vote was 84 to 13.

Trump’s position on the bill has sharply divided GOP lawmakers, forcing them to choose between loyalty to the President and legislation that sets defense policy for the country. In the end, however, the President’s opposition was not enough to stall passage of the legislation through Congress. The Senate vote comes after the House of Representatives also passed the bill with a veto-proof majority earlier this week. Now it will be up to Trump to decide how to respond.

The $740 billion bill known as the National Defense Authorization Act includes pay raises for America’s soldiers, modernizations for equipment and provisions to require more scrutiny before troops are withdrawn from Germany or Afghanistan, but that hasn’t stopped Trump’s threats against it.

Trump has threatened to veto the bill because it doesn’t include a repeal of Section 230, a law that shields internet companies from being liable for what is posted on their websites by them or third parties. The bill also includes provisions to limit how much money Trump can move around for his border wall and another that would require the military to rename bases that were named after figures from the Confederacy.

The President urged House Republicans to oppose the bill just hours ahead of the vote in that chamber earlier this week, saying, “I hope House Republicans will vote against the very weak National Defense Authorization Act (NDAA), which I will VETO.”

Trump’s threat to veto the annual defense bill drew swift and sharp bipartisan pushback from lawmakers who have argued that Trump is using leverage over the troops to settle personal scores.

Trump has received vocal support from some allies.

Sen. Lindsey Graham, a South Carolina Republican and chairman of the Senate Judiciary Committee, had backed the President on his push to remove Section 230.

“I support President @realDonaldTrump’s insistence Section 230 repeal be part of the defense authorization bill,” he wrote in a three-tweet thread. “Big Tech is the only industry in America that cannot be sued for their business practices and are not meaningfully regulated. This must come to an end.”

The conservative House Freedom Caucus announced ahead of the vote in the House that its members will side with Trump in his opposition to the legislation and was pressuring other GOP members to side with Trump as well.

Multiple House lawmakers, including the top Democrat and Republican on the House Armed Services Committee, however, have said they will cut their holiday short if necessary for Congress to return to Washington to override a veto if necessary.

If Trump successfully vetoes the NDAA it would impact “special pay” for thousands of US service members across the military branches. Special pay includes raises for service members in highly-skilled positions where there is a lot of competition with the private sector for personnel.