The measure, formally known as the National Defense Authorization Act, puts Trump in an awkward position on multiple fronts
The US Senate overwhelmingly passed a sweeping defense budget bill Friday with a veto-proof majority, defying President Donald Trump who has threatened to block the legislation six weeks from leaving office.
With both chambers having now passed the measure by sizable majorities, lawmakers from both parties have collectively thrown down the gauntlet before the Republican leader and signaled he would face an override if he moves to veto the bill.
The must-pass $740.5 billion measure has earned Trump's ire in part because it does not abolish a law granting social media firms liability protection for third-party content on their platforms.
Trump has railed repeatedly against the law, known as Section 230, and says giants like Facebook and Google are biased against him.
He has also voiced disapproval of the bill's language calling for renaming US military bases that honor Confederate commanders from the pro-slavery South in the Civil War.
Both chambers cleared the legislation with well beyond the two-thirds "super majority" needed to override a presidential veto: 84 to 13 in the Senate, and a 335-78 vote on Tuesday in the House.
"This is great news for our troops and the security of our nation," Senate Armed Services Committee chairman James Inhofe said in a statement on the bill's passage.
"I look forward to it becoming law before the end of the year."
The measure, formally known as the National Defense Authorization Act, puts Trump in an awkward position on multiple fronts.
It mandates that the US president slap sanctions on Turkey within 30 days for its acquisition of the Russian-made S-400 missile defense system, even as Trump has resisted such punishments against Turkey and its president, Recep Tayyip Erdogan.
"It is unacceptable that a North Atlantic Treaty Organization ally like Turkey's President Erdogan has decided to purchase, keep, and test the Russian S-400 missile defense system," Senate Foreign Relations Committee chairman Jim Risch, a Republican, said in a statement.
"This year's NDAA makes clear that Turkey's purchase of the S-400 system is a sanctionable activity, and therefore mandates the imposition of sanctions on Turkey for this purchase."
The defense bill also expands sanctions related to the construction of the disputed Nord Stream 2 gas pipeline linking Russia to Europe, on which Washington has sought to impose a moratorium.
Nord Stream 2, an $11 billion pipeline near completion beneath the Baltic Sea, is set to double Russian natural gas shipments to Germany, the EU's largest economy.
Risch said it "threatens Europe's energy independence" and bolsters the Russian government, and said the NDAA's expanded sanctions "are important tools in countering Russia's malign influence and protecting the integrity of our allies' security."
US sanctions signed by Trump last year, including threatened asset freezes and visa restrictions for companies involved in the construction, caused a suspension of work on the pipeline.
But construction resumed on Friday, the project's managers said just hours before the NDAA's Senate passage.
The NDAA that heads to Trump goes against his drive to slash the US troop presence in Germany and elsewhere.
It imposes on the Pentagon a deadline of at least 120 days before any reduction of forces in Germany, ensuring that no American withdrawal can take place before Democratic President-elect Joe Biden takes office on January 20.
Republican Senator Rand Paul had threatened to hold up a vote on the NDAA as he wanted to remove the language that limits Trump's ability to withdraw or reduce troops from abroad.
He ultimately relented and dropped his opposition.