(Bloomberg) -- Republican and Democratic leaders are expressing confidence that compromise legislation to avert a catastrophic US default will pass the House of Representatives Wednesday night on the backs of moderates. 

The legislation, a product of intense negotiations between President Joe Biden and House Speaker Kevin McCarthy, drew more heat 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 sizable 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.”

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, days ahead of the June 5 default deadline.

Senator Mike Lee of Utah, who has threatened to use procedural obstacles to delay a vote, said Wednesday he would agree to a faster Senate decision if he is allowed votes on amendments he is preparing.

Read more: Debt-Ceiling Anxiety Tracker: Fears Abating In Financial Markets

In one sign of growing momentum in the House, the 64-member bipartisan Problem Solvers Caucus agreed to back the legislation, an aide said early on Wednesday.

McCarthy is fighting to ensure that a majority of his 222 members vote for the bill, limiting the reliance on minority Democrats to pass it. Falling short of that would politically weaken the speaker.

Democrats have pressed Republicans to supply at least 150 votes to pass the legislation. On Wednesday, Katherine Clark, the No. 2 Democrat in the House, questioned whether McCarthy has the votes within his own caucus. 

“We still don’t know if the votes are there,” Clark said of Republicans. 

House conservatives, in particular, have blasted the deal for not doing more to curb federal spending. One, Dan Bishop of North Carolina, has said he’ll call for a vote to remove McCarthy from his job. No other Republicans have explicitly joined him. 

Representative Patrick McHenry, one of McCarthy’s chief negotiators on the bill, expressed confidence in McCarthy, telling reporters that the Wednesday vote will show that Washington underestimated the speaker. 

Several Democrats — even those opposed to the legislation — have vowed not to let the US default. Representative Jan Schakowsky of Illinois, a liberal Democrat, doesn’t back the bill but signaled she would ultimately support it if her vote was needed for passage.

Progressive Caucus Chair Pramila Jayapal came out against the bill because of cuts to social and environmental programs. Much of her caucus, which numbers about 100 Democrats, will oppose the bill.

“I do think it’s important that we put up a very strong no vote and that we don’t give them one vote more than what they need,” Jayapal said.  

The S&P 500 declined Wednesday after data showed US job openings unexpectedly surged in April, raising the prospect of another interest-rate hike from the Federal Reserve. Two-year Treasury yields also pared earlier declines and the dollar strengthened.

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.

--With assistance from Emily Wilkins, Zach C. Cohen and Steven T. Dennis.

(Updates with Biden, Lee remarks beginning with fourth paragraph)

©2023 Bloomberg L.P.