Meanwhile, Democrats, whose support would be critical for passage in the Senate, began lining up in opposition amid pressure from immigration activists to use the budget talks as leverage to legalize many young immigrants known as "dreamers."
By Wednesday evening, the short-term bill was on the cusp of failure.
The Capitol Hill showdown reflected a broader clash certain to dominate national politics in the months leading up to November's midterm elections. President Trump and congressional Republicans are determined to fulfill the campaign promises that swept them to power in 2016, including boosting military spending and scaling back immigration. Democrats have been emboldened by Trump's unpopularity and a surge of grass-roots activism to resist at every turn.
Absent an accord, federal agencies would cease nonessential activities and furlough hundreds of thousands of employees at midnight Friday evening — the first shutdown since 2013, when GOP opposition to the Affordable Care Act sparked a 16-day standoff.
House Republicans unveiled a bill Tuesday that would extend funding for four weeks, allowing time for further negotiations toward deals on long-term spending and immigration. To entice Democrats, GOP leaders attached a six-year extension of the popular Children's Health Insurance Program, as well as the delay of two unpopular health-care taxes.
But few, if any, Democrats have been swayed by the overture. House Democratic leaders urged their caucus to withhold their votes, forcing Republicans to produce their own majority. And most Senate Democrats, whose votes are necessary to pass, bristled at the strategy.
"I think there's a lot of reluctance to take what Republicans throw at us without any negotiation," said Sen. Chris Murphy (D-Conn.), who remained undecided on the bill. "I mean, what's amazing to us is, we're 48 hours from a shutdown, and Republicans aren't willing to engage in a good-faith negotiation with Democrats."
At the same time, Democrats were far from unified. While some promised to oppose the funding measure, others were reluctant to shut down the government. "I don't think there's consensus," Murphy said.
Republicans, meanwhile, laid the groundwork to blame a shutdown on Democrats. Senate Majority Leader Mitch McConnell (R-Ky.) noted Democrats have called for a renewal of the children's health program and said, "We have a good chance of passing it." House Speaker Paul D. Ryan (R-Wis.) said it was "baffling" and "unconscionable" that Democrats would vote against the bill.
"Good-faith negotiations are underway, and to push that aside and try and jeopardize funding for things like [children's health insurance] and our military, to me, makes no sense," Ryan said.
Democrats have sought to bargain over a litany of policy matters, including funding to counter opioid abuse and protections for failing pension plans.
The most explosive issue, however, remained the fate of the roughly 690,000 young immigrants who enrolled in the Deferred Action for Childhood Arrivals program under President Barack Obama's administration to avoid deportation, as well as other "dreamers" who were brought to the United States as children.
Trump has announced plans to end the DACA program in March, forcing high-stakes negotiations over a legislative fix. Democrats have insisted that those talks be combined with the debate over a long-term spending accord, which has placed immigration policy at the center of the shutdown drama.
As House Republican leaders worked to avoid a shutdown, White House Chief of Staff John F. Kelly made the rounds on Capitol Hill, meeting with members of groups including the Congressional Hispanic Caucus, who are pushing for a DACA fix, and the hard-right House Freedom Caucus, who want border security funding and tighter immigration policies.
After exiting a bipartisan meeting of top congressional leaders, Kelly gave an upbeat assessment of the immigration talks while offering no timetable for when an agreement might be reached.
"The DACA deal will be worked out, I think, by the United States Congress," he told reporters. "Both sides of the aisle have agreed to meet in a smaller group and come up with [what] they think is the best DACA deal, and then it'll of course be presented to the president."
Senate Minority Leader Charles E. Schumer (D-N.Y.) told reporters Wednesday that an "overwhelming number" of Senate Democrats were opposed to another short-term funding bill without an accord on immigration.
"They believe if we kick the can down the road this time, we'll be back where we started from next time, so there's very, very strong support not to go along with their deal," he said.
Several Democratic senators who voted for a similar bill in December, giving Republicans enough votes to avert a pre-Christmas shutdown, announced on Wednesday that they would not support another patch.
Sen. Martin Heinrich (D-N.M.) said he was "not willing to leave these bipartisan priorities behind and vote for a bill that gives President Trump and congressional Republicans more time to hold the country hostage."
At least one Senate Republican, Lindsey O. Graham of South Carolina, further complicated the GOP outlook, saying he, too, would oppose the bill. Sen. John McCain's (Ariz.) absence because of cancer treatment left only 49 potential Republican votes for the bill, and two of those, Mike Lee (Utah) and Rand Paul (Ky.), voted against previous similar measures.
"I'm tired of it," said Graham, who crafted a bipartisan DACA proposal that Trump rejected last week. "This is the fourth one we've done, and you're killing the military."
Passage in the Senate requires 60 votes, but defections among Democrats had pushed the GOP to the edge.
House GOP leaders hoped to hold a vote on the spending bill Thursday but faced a potential revolt from Republican members of the House Armed Services Committee, who have bristled at the delay in an agreement boosting military funding, and conservative hard-liners, who want to take a tough line with Democrats on immigration and other issues.
"The only way they're going to be taking the deal that we're offering . . . is if they're forced to, and no one has the courage to force them to," said Rep. Scott Perry (R-Pa.), a member of the House Freedom Caucus.
The chances that a shutdown would come to pass increasingly rested on a small group of moderate Senate Democrats, who are being forced to choose between their party's efforts to secure immigration and funding priorities and their desires to keep agencies open while talks continue.
They are under intense pressure from liberal activists and advocates for immigrants, who are pushing Democrats to stand up to Trump and Republicans — particularly on behalf of dreamers, who could be at risk for deportation under Trump's policies.
Angel Padilla, policy director for Indivisible, a network of liberal citizen groups, said the organization's 6,000 chapters nationwide are focused this week on pressuring Democrats to vote against the next spending plan.
"This is a much bigger issue after what happened last week," Padilla said, referring to reports that Trump called African nations, El Salvador and Haiti "shithole countries."
"We don't understand why a Democrat would go along, given what happened last week," he added. "Sometimes it's a hard vote, but sometimes you have to do this."
The clash has posed an intense quandary for Schumer, whose instinct has long been to protect the more moderate members of his caucus from political peril in an election year. But the bigger risk could be alienating his party's liberal base.
Inside the Democrats' lunch Wednesday, according to a person not authorized to speak publicly about it, Schumer laid out the state of negotiations and asked senators to relay to him how they were leaning. There was frustration, the person said, that they have not been able to force Republicans to negotiate on the bill, but it remains unclear whether 41 Democrats would be willing to force a shutdown.
"Chuck has been very clear on this: He knows that each senator is going through a thought process about where they want to end up, how they would explain their vote, what their position is going to be, and he's given lots of room to members to make decisions," said Sen. Richard J. Durbin (D-Ill.), the assistant party leader, after emerging from the lunch. That said, he added, "No one stood up and said they had to vote for this thing."
Brian Fallon, a former Schumer aide who is now a senior adviser to Priorities USA, a Democratic super PAC, said Democrats' power to force a deal might never be greater than it is now — with bipartisan priorities stalled and a president seemingly under siege. "I think that moderates who remain skittish here don't realize the amount of leverage they have," he said.
The bigger risk, Fallon said, would be punting again on an immigration deal and alienating key partners in the Democratic coalition: "I think the activists are asking a fair question when they ask, 'If not now, when?' "
Eighteen Senate Democrats voted for the last temporary spending bill.
Now that group is under exponentially more pressure, and there are signs at least some could buckle.
"I think it's a bad proposal, I'll just tell you that, and it has nothing to do with DACA; it's a bad proposal," said Sen. Jon Tester (D-Mont.), who voted for the December bill, "It doesn't push us in the direction we need to go."