The House passed legislation late Wednesday to implement the debt ceiling agreement negotiated between President Biden and House Speaker Kevin McCarthy, putting Congress on track to allow more borrowing just days before the government is expected to run out of money.

The bill passed in a 314-117 vote that saw majorities in both parties support the agreement, which also meets the GOP demand of cutting nondefense discretionary spending over the next two years. Republicans supported the bill by a 149-71 margin, and Democrats supported it 165-46.

Democrats took credit for helping get the bill across the finish line. Earlier in the day, 52 Democrats made the rare move of voting with Republicans in a procedural vote to keep the bill alive.

"I thank House Democrats for your steady hand, for your unity of purpose, for your efforts to make sure that we push back the extreme mega Republican efforts to jam right wing cuts down the throats of the American people that would have undermined the health, the safety and the economic well-being of everyday Americans," Minority Leader Hakeem Jeffries said on Wednesday night.

DEMOCRATS HELP MCCARTHY ADVANCE DEBT CEILING DEAL IN NAILBITER HOUSE VOTE

Kevin McCarthy

US House Speaker Kevin McCarthy, R-Calif., leaves his office and walks to the House Chamber to vote on the US debt limit at the US Capitol in Washington, DC, on May 31, 2023. (Photo by Mandel NGAN / AFP) (Photo by MANDEL NGAN/AFP via Getty Images)

"From the very beginning, House Democrats were clear that we will not allow extreme MAGA Republicans to default on our debt, crash the economy or trigger a job killing recession. Under the leadership of President Joe Biden, Democrats kept our promise and we will continue," he said.

Former House Speaker Nancy Pelosi, called the bill "objectionable" though added, "It will avert unprecedented default, which would bring devastation to America's families."

McCarthy, R-Calif., touted the bill’s spending cuts even though it fell short of conservatives’ original aim of slashing spending by roughly $150 billion from this year to the next.

"Tonight we’re going to do something we haven’t done before," McCarthy said. "Tonight, we are going to vote for the largest savings in American history – over $2.1 trillion. That’s what we’re voting for. Every great nation that has overextended itself has collapsed."

GOP TOUTS MCCARTHY-BIDEN DEAL AS ‘CONSERVATIVE’ VICTORY AS SOME REPUBLICANS DEFECT

The House vote sends the bill to the Senate, where Majority Leader Chuck Schumer promised earlier in the day it would hit the floor "as soon as possible." That vote is expected to take place this week, barring any objections from senators to moving quickly.

Hakeem Jeffries

Democratic Caucus Chair Hakeem Jeffries, D-N.Y., center, vice chair Rep. Pete Aguilar, D-Calif., and House Minority Whip Katherine Clark, D-Mass., talk to reporters ahead of the debt limit vote. (Tom Williams/CQ-Roll Call, Inc via Getty Images)

Treasury Secretary Janet Yellen has warned that the U.S. government is expected to run out of cash to pay its current obligations if Congress does not raise or suspend the debt limit by Monday, June 5.

Asked about the viability of a Senate vote by Friday, Senate Minority Leader Mitch McConnell told reporters, "I can tell you what I hope happens… that we can finish this Thursday or Friday and soothe the country and soothe the markets."

The final agreement reached over the weekend suspends the debt limit with no cap through Jan. 1, 2025, while also cutting non-defense spending to near fiscal 2022 levels, capping growth at 1% for the next two years and proposing non-mandatory caps for the four years after. It also claws back some money aimed at the Internal Revenue Service and some unspent COVID-19 pandemic funds.

But several conservative Republicans made their opposition to the deal known soon after it was struck on Saturday night.

DEBT CEILING AGREEMENT IN PRINCIPLE REACHED BETWEEN DEMOCRATS, REPUBLICANS

Many of the bill’s GOP detractors complained its spending cuts did not go far enough, and many urged McCarthy to go back to House Republicans’ original Limit, Save, Grow Act – which Democrats in the House and Senate panned as the "Default on America Act."

Congressman Chip Roy is pictured on the steps of Capitol Hill

Rep. Chip Roy, R-Texas, is one of the bill's most vocal conservative detractors (Bill Clark/CQ-Roll Call, Inc via Getty Images)

Others, like Rep. Mike Waltz, R-Fla., were also worried about the bill’s modest increase to the Defense budget, which at just over 3% is less than the rate of inflation.

Rep. Garret Graves, R-La., one of McCarthy's top negotiators, pushed back against the notion that the bill does not go far enough to meet Republican goals.

CLICK TO GET THE FOX NEWS APP

"To say we didn't push [the White House] to the brink, to say that we didn't maximize negotiations, it’s just an uninformed position," he told Fox News Digital. "It's just really unfortunate that people have put us in the situation."