WASHINGTON — President Joe Biden’s economic agenda faces a pivotal day in Congress Wednesday, with the prospects growing of an embarrassing setback for his infrastructure bill and markets beginning to take notice of the intensifying debt ceiling standoff with Republicans.

Senate Majority Chuck Schumer said he anticipates Congress will avert a government shutdown by passing a stopgap spending bill before current funding expires on Friday. But he was not as optimistic on efforts to suspend the debt ceiling, which Republicans have refused to do.

“We’re just asking Republicans to get out of the way,” Schumer said on the Senate floor.

Treasury Secretary Janet Yellen has warned that a default looms on Oct. 18 without congressional action.

Concerns about the current impasse in Washington over the debt limit and other fiscal measures contributed to the biggest selloff in equities since May. The 2% drop in the S&P 500 Index was partially reversed in Wednesday trading.

Congress appears to be working toward averting a shutdown of nonessential government functions after the end of the fiscal year on Thursday. The Senate as soon as Wednesday plans to take up the stopgap spending bill extending funding through Dec. 3 and providing billions in disaster aid and funds for Afghan refugees. The House plans to quickly follow suit.

Democrats earlier attempted to use the stopgap measure as a vehicle for a debt ceiling suspension but Republicans blocked that effort in the Senate.

For now, Democrats are trying to win public support. They plan to pass a stand-alone debt limit bill in the House to highlight the issue and continue to seek GOP consent in the Senate to pass the debt limit with just 51 votes instead of the usual 60 votes.

Republicans continue to press Democrats to use the same fast-track budget process to raise the debt ceiling without GOP support they plan to use for the tax and spending measure that encompasses much of Biden’s agenda.

Across the Capitol, Speaker Nancy Pelosi faces an agonizing choice of when to hold a vote on the $550 billion infrastructure bill, which has already passed the Senate with bipartisan support.

Pelosi has promised moderates in her caucus a Thursday vote on the bill, a top priority for swing-district Democrats. But progressives have doubled down on their threat to vote down the bill until the House and Senate passes a $3.5 trillion tax and spending measure that funds many of their priorities.

“I think if we come to a place where we have agreement in legislative language, not just principle but legislative language that the president supports,” Pelosi said, “and then I think we will come together.”

To unlock the second larger bill, the House is waiting on Senate moderates led by Joe Manchin of West Virginia and Kyrsten Sinema of Arizona to reveal the price tag they’ll support. Manchin has hinted he could back $1.5 trillion while Sinema has been more circumspect.

Biden is personally negotiating with the two senators and canceled a trip to Chicago to continue those talks.

Without some deal between Biden and the moderates, it is increasingly likely that that the infrastructure bill will fail on the House floor or that Pelosi will pull it from the schedule. As a result, the entire Biden agenda could languish in Congress for months.

Senate Budget Committee Chairman Bernie Sanders, a Vermont independent, said he’s hopeful the infrastructure bill fails in the House if brought to a Thursday vote and will jolt moderates on the economic package.

“I think that’s the right thing to do and I’m encouraged by that,” Sanders, who initially pushed for a much larger social spending package, said of progressives’ plans to sink the infrastructure bill. “And I would hope that that sends a signal to every member of the Democratic caucus including Senators Sinema and Manchin that we’re going to start serious negotiations and pass a very strong reconciliation bill.”