(Bloomberg) -- The House passed debt-limit legislation forged by President Joe Biden and Speaker Kevin McCarthy that would impose restraints on government spending through the 2024 election and avert a destabilizing US default.

Lawmakers from both parties joined to approve the bill 314-117 Wednesday evening, sending the measure to the Senate for consideration as a default deadline draws near. The vote cements Biden’s reputation for pragmatism and working across party lines as he seeks a second term and allows McCarthy to claim success in his first major test as speaker.

The agreement won the backing of two-thirds of House Republicans, an important show of confidence for McCarthy, whose narrow GOP majority leaves him vulnerable to challenges from discontented members. But the bill ultimately received more votes from the Democratic minority than the GOP majority, a fact conservative critics will use to argue the speaker made a bad deal.

The outcome marked a rare moment of bipartisan accord in a bitterly divided Washington.

Biden, who watched the vote on TV, called the House result “good news for the American people and the American economy.” 

Investors have already largely judged the danger of a US default past and are shifting attention to other uncertainties more likely to influence growth, such as another possible Federal Reserve interest-rate increase and signs of a weakening Chinese economy.

The Bloomberg Dollar Spot Index was little changed at 10.20 a.m. in London, while Treasuries fell. The two-year yield rose five basis points to 4.45%, after slipping more than 15 basis points in the past two days.

The debt bill would remove the threat of another default crisis for the remainder of Biden’s current term, suspending the debt ceiling until Jan. 1, 2025. In exchange, Democrats agreed to cap federal spending into 2025, likely forcing some retrenchment in government services given the current 5% annual inflation rate.

The deal now heads to the Senate, where approval is virtually certain and the only question is timing. Senate Republican leader Mitch McConnell said earlier Wednesday that the measure could get a vote as soon as Thursday, days ahead of the June 5 default deadline.

During the House debate, both parties took a victory lap. McCarthy called the legislation “a step toward smaller government.” House Democratic leader Hakeem Jeffries said his party succeeded in “stopping extreme MAGA Republicans from crashing the economy.”

Spending restraints in the deal may have a big impact on individuals, notably young college graduates who will have to resume student loan payments and some lower-income Americans hit with benefit restrictions or service cuts. But Morgan Stanley economists estimate the entire package will have “negligible impact” on the overall US economy, likely dampening growth next year by a couple tenths of a percentage point.

The hard choices on how to adjust government services are mostly left to Congress to negotiate in separate spending packages due before the Oct. 1 start of the next federal fiscal year. The Congressional Budget Office projects the spending caps will require $64 billion in cuts next year, though White House officials claim they have a side deal to counteract most of those cuts, effectively amounting to an overall spending freeze.

Still, the deal marks a turning point toward reining in government spending after years of record-breaking Covid-related bailouts and two signature Biden initiatives unleashing large government investments in infrastructure and combating climate change.

Even so, hard-line conservatives denounced the compromise for falling short of Republican demands for deeper spending cuts and more stringent work requirements for recipients of food assistance and other anti-poverty aid. 

Fury among ultra-conservatives over the concessions poses a serious risk to McCarthy since he could be thrown out of his job by even a small group of Republicans because of his party’s narrow majority. Republican Representative Dan Bishop said Tuesday he would call for a vote to remove the speaker. 

Democratic progressives also were angered over the agreement’s spending cuts, provisions expediting permitting for energy projects and expanded work requirements for federal food stamps. Revving up lackluster enthusiasm for Biden that Democrats’ core progressive voters are showing in recent polls will be critical to the president’s reelection.

--With assistance from Steven T. Dennis, Jarrell Dillard, Anna Edgerton, Gregory Korte, Zach C. Cohen, Josh Wingrove and Alice Gledhill.

(Updates with markets in seventh paragraph)

©2023 Bloomberg L.P.