Congress sent a two-year budget and debt ceiling deal to President Trump over the objection of 22 Senate Republicans.

Many Republicans failed to heed a last-minute tweet from President Trump urging them to back the accord.

It passed by a vote of 65-28. Five Democrats voted against the deal.

Once signed by Trump, the deal will permit unfettered federal borrowing through July 31, 2021 and busts federal spending caps by $320 billion over the next two fiscal years. It leaves out an extension of the Budget Control Act, which expires in two years. The act imposed spending restraints meant to force lawmakers to impose fiscal reforms.

“This may well be the most fiscally irresponsible thing we have done in the history of the United States,” Sen. Rand Paul, R-Kentucky, declared ahead of the vote.

Republicans bolted away from the deal much the same way they rejected it in the House when it passed the measure last week over the objections of 132 GOP lawmakers.

The GOP objections stem from dire predictions about the nation’s debt and deficit.

The current debt tops 22 billion, and the deficit is about $1 trillion. The Committee for a Responsible Federal Budget predicted the accord could increase the deficit by another $1.7 trillion over the next decade.

But both parties were wary of another government shutdown after a 35-day spending standoff earlier this year and were willing to trade off increased domestic spending for a boost in military funding despite the fiscal consequences.

Bipartisan leaders in the House and Senate signed onto the deal, but it was negotiated mostly by Speaker Nancy Pelosi, D-California, and Treasury Secretary Steven Mnuchin.

Speaking ahead of the vote, Majority Leader Mitch McConnell urged lawmakers to back the accord while at the same time calling it the “Administration-Pelosi budget deal.”

McConnell touted increased defense spending and an extension of borrowing power needed to keep the nation running.

“We need to address the debt limit and secure the full faith and credit of the United States,” the Kentucky Republican said ahead of the vote. “We need to continue to secure the funding that our national defense demands. Fortunately, the pending legislation will accomplish precisely that.”

The measure bolsters military spending by about 3% and would fund it at $738 billion in 2020. It raises domestic spending by 4%, a priority for Democrats who considered the deal a victory for their party.

"That's the nature of compromise," Sen. John Cornyn, R-Texas, said.