This is an archived article and the information in the article may be outdated. Please look at the time stamp on the story to see when it was last updated.

WASHINGTON (AP) — Congress on Friday overrode President Donald Trump’s veto of a defense policy bill, a first by lawmakers since he took office nearly four years ago, ensuring that the measure becomes law.

In an extraordinary New Year’s Day session, the Republican-controlled Senate easily turned aside the veto, dismissing Trump’s objections to the $740 billion bill and handing him a stinging rebuke just weeks before he leaves the White House.

Trump lashed out on Twitter, saying the Senate missed an opportunity to eliminate protections for social media platforms that he said give “unlimited power to Big Tech companies. Pathetic!!!”

Trump also slammed lawmakers for rejecting his call to increase COVID-19 relief payments to $2,000: “Not fair, or smart!”

The 81-13 vote in the Senate on the widely popular defense bill followed an earlier 322-87 override vote in the House. The bill affirms a 3% pay raise for U.S. troops and guides defense policy, cementing decisions about troop levels, new weapons systems and military readiness, personnel policy and other military goals.

House Speaker Nancy Pelosi, D-Calif., said the “sweeping and overwhelmingly bipartisan votes” in the House and Senate “delivered a resounding rebuke to President Trump’s reckless assault on America’s military and national security.”

Trump’s veto of the National Defense Authorization Act, or NDAA, “would have hurt the health, financial security and safety of our servicemembers, their families, our veterans and our allies and partners worldwide,” Pelosi said. “Instead of keeping Americans safe, the president continues to use his final moments in office to sow chaos and undermine our security.”

The defense bill, which now has the force of law, “looks after our brave men and women who volunteer to wear the uniform,” said Senate Majority Leader Mitch McConnell, R-Ky. “But it’s also a tremendous opportunity: to direct our national security priorities to reflect the resolve of the American people and the evolving threats to their safety, at home and abroad. It’s our chance to ensure we keep pace with competitors like Russia and China.”

The Senate override was delayed after Sen. Bernie Sanders, I-Vt., objected to moving ahead until McConnell allowed a vote on the Trump-backed plan to boost COVID relief payments to $2,000. McConnell did not allow that vote; instead he used his parliamentary power to set a vote limiting debate on the defense measure, overcoming a filibuster threat by Sanders and Senate Democratic leader Chuck Schumer of New York.

Without a bipartisan agreement, a vote on the bill could have been delayed until Saturday night. Lawmakers, however, agreed to an immediate roll call Friday once the filibuster threat was stopped.

Trump vetoed the defense measure last week, saying it failed to limit Twitter and other social media companies he claimed were biased against him during his failed reelection campaign. Trump also opposed language that allows for the renaming of military bases that honor Confederate leaders.

Sen. Jim Inhofe, R-Okla., chairman of the Senate Armed Services Committee and a close Trump ally, hailed the override vote.

“Today, the Senate sent a strong message of support to our troops,” Inhofe said. “Not only does this bill give our service members and their families the resources they need, but it also makes our nation more secure — pushing back against China and Russia (and) strengthening our cyber defenses.”

Trump has succeeded throughout his four-year term in enforcing party discipline in Congress, with few Republicans willing to publicly oppose him. The bipartisan overrides on the defense bill showed the limits of Trump’s influence in the final weeks of his term.

Earlier this week, 130 House Republicans voted against the Trump-backed COVID relief checks, with many arguing they were unnecessary and would increase the federal budget deficit. The Democratic-controlled House approved the larger payments, but the plan fizzled in the Senate amid opposition from McConnell and other Republicans, another sign of Trump’s fading hold over Congress.

Only seven GOP senators voted with Trump to oppose the defense bill override. Forty Republicans — including the entire GOP leadership — voted for the override, along with 41 Democrats. Sanders and five other liberals who opposed the defense bill also voted against the override.

Besides his concerns about social media and military base names, Trump also complained that the bill restricted his ability to withdraw thousands of troops from Afghanistan and Germany. The measure requires the Pentagon to submit reports certifying that the proposed withdrawals would not jeopardize U.S. national security.

Trump has vetoed eight other bills, but those were all sustained because supporters did not gain the two-thirds vote needed in each chamber for the bills to become law without Trump’s signature.

Rhode Island Sen. Jack Reed, the top Democrat on the Senate Armed Services Committee, called Trump’s Dec. 23 veto a “parting gift” to Russian President Vladimir Putin “and a lump of coal for our troops. Donald Trump is showing more devotion to Confederate base names than to the men and women who defend our nation.”