The final vote was 84-13 on the National Defense Authorization Act (NDAA), well beyond the two-thirds requirement to override a potential veto if Trump carried through on his threat to sink the legislation.
“The Senate’s bipartisan passage of the NDAA shows that members on both sides of the aisle are committed to a strong national defense and to the protection of our women and men in uniform—regardless of petty veto threats from the outgoing president," said Sen. Dick Durbin, D-Ill.
The House already approved the legislation with a veto-proof majority on Tuesday with a 335-to-78 vote as many Republicans broke with Trump in favor of maintaining a 60-year tradition of approving the annual defense legislation.
“Congress’ first duty is to provide for the common defense," said Sen. John Barrasso, R-Wy. "The National Defense Authorization Act is how we keep America safe. For 60 consecutive years, Congress has passed this bill."
The legislation will give U.S. troops 3% pay raises and now heads to Trump's desk.
Trump has vowed to veto the bill unless lawmakers impose limits on social media companies he claims were biased against him during the election. Trump has also said he wants Congress to strip out a provision of the bill that allows renaming of military bases that now honor Confederate leaders.
Senate Majority Leader Mitch McConnell, R-Ky., in a rare break with Trump, urged passage of the measure despite Trump's threat to veto it.
“This NDAA will unlock more than $740 billion for the training, tools and cutting-edge equipment that our service members and civilian employees need to defend American lives and American interests,'' McConnell, said. "It will give our troops the 3% pay raise they deserve. It’ll keep our forces ready to deter China and stand strong in the Indo-Pacific.''
Trump tweeted Tuesday that he will veto “the very weak" defense bill unless it repeals Section 230, a part of the communications code that shields Twitter, Facebook and other tech giants from content liability.
Congress has never overridden one of Trump's eight vetoes. Congress has only overridden the president 111 times in history.
Lawmakers hoped Trump would reconsider the veto-threat.
“I think we can override the veto, if in fact he vetoes," House Majority Leader Steny Hoyer, D-Md., said Tuesday. “I hope he does not veto. I hope he reconsiders. And I think he will get substantial pressure (from Republicans) that, you know, you don’t want to put the defense bill at risk.″
Chad Pergram and the Associated Press contributed to this report.