(Bloomberg) -- The House began voting Wednesday evening on the deal struck by House Speaker Kevin McCarthy and President Joe Biden to avert a catastrophic US default. 

Leaders of both parties expressed confidence they had enough votes to pass the bill and send it to the Senate days before the June 5 default deadline. 

Hours earlier, the House voted, 241-187, to take a procedural step needed to consider the measure. Such votes setting the rules for debate are nearly always decided along party lines, but McCarthy needed votes from Democrats to offset 29 Republican “no” votes, underscoring the divide within his own party over the legislation. 

The compromise drew opposition from lawmakers on the flanks of both parties as the vote approached.

But Biden, McCarthy and their lieutenants have worked the phones since concluding the deal Saturday night to build a large enough coalition of moderates to muster the requisite 218 votes for passage in the House. 

“I think things are going as planned,” Biden told reporters at the White House, before he was due to leave for Colorado. “God willing, by the time I land, Congress will have acted, the House will have acted, and we’ll be one step closer.”

Debt-Ceiling Anxiety Tracker: Fears Ebb in Financial Markets

House Majority Whip Tom Emmer, a Minnesota Republican, said early Wednesday that he’s sure the votes are in hand. “It’s going to pass,” he said.

The bill will next go to the Senate, where objections from conservatives could force days of debate. But John Thune, the Senate’s No. 2 Republican, said Wednesday that there could be a deal to pass the bill by Friday night.

The bill would set the course for federal spending for the next two years and suspend the debt ceiling until Jan. 1, 2025 — postponing another clash over borrowing until after the presidential election. 

In exchange for Republican votes for the suspension, Democrats agreed to cap federal spending for the next two years. The White House is telling lawmakers the deal would lower spending by about $1 trillion over a decade, while the GOP argues the spending cut is double that.

The nonpartisan Congressional Budget Office on Tuesday estimated that the bill would cut deficits by $1.5 trillion over 10 years.

©2023 Bloomberg L.P.