Calling the bill “a gift to China and Russia,” President Donald Trump has rejected the national defense authorization bill that was passed by veto-proof majorities in the U.S. House and Senate.

Trump sent the bill back to Congress on Wednesday, saying the measure “fails to include critical national security measures, includes provisions that fail to respect our veterans and our military’s history, and contradicts efforts by my administration to put America first in our national security and foreign policy actions.”

Two weeks ago, the GOP-led Senate approved a wide-ranging defense policy bill by a large enough majority to override Trump’s veto.

The Senate followed the Democratic-controlled House, which approved the measure. The House voted 335-78 in favor of the $731 billion defense measure, hours after Trump renewed his threat to veto the bill unless lawmakers clamp down on social media companies he claims were biased against him during the election.

Trump tweeted that he will veto “the very weak National Defense Authorization Act,″ or NDAA, unless it repeals so-called Section 230, a part of the communications code that shields Twitter, Facebook and other tech giants from content liability. Trump also wants Congress to strip out a provision of the bill that allows renaming of military bases that now honor Confederate leaders.

Congressional leaders vowed to move ahead on the bill — which affirms automatic 3% pay raises for U.S. troops and authorizes other military programs — despite the veto threat.

A total of 140 Republicans joined 195 Democrats to back the bill in the House.

Wyoming Rep. Liz Cheney, a member of the House Republican leadership, urged Trump not to follow through on his veto threat, but added that if he does veto it, “We should override.″

If Trump vetoes the bill, “we will come back to vote to override,” said Rep. Adam Smith, D-Washington, the chairman of the House Armed Services Committee.

The Associated Press contributed to this report.