Donald Trump has railed repeatedly against the law, known as Section 230, and says giants like Facebook and Google are biased against him.
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 outgoing Republican leader and signalled he would face an override if he moves to veto the bill.
The $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 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."
It remains to be seen whether all Republicans will maintain their stance to counter Trump's expected veto.
The National Defense Authorization Act that heads to Trump also 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.