The weeks-old standoff on immigration and spending only grew more charged last week after Mr. Trump referred to African nations as “shithole countries.” By Thursday, talks on those matters had produced little visible progress, and prominent House Democrats were introducing a resolution to censure the president for his words.

In the Senate, Democrats were unifying around a “no” vote. If the stopgap bill passes, Senator Chuck Schumer, the Democratic leader, said, “there’ll be no incentive to negotiate, and we’ll be right back here in a month with the same problems at our feet.”

Republicans were left seething.

“We’re either going to act like 13-year-olds or not,” said Senator John Kennedy, Republican of Louisiana. “Our first job is to keep government going, and if you’re going to shut her down, it better be for a damn good reason.”

Senator Mitch McConnell of Kentucky, the majority leader, lamented the Democrats’ “fixation on illegal immigration” at the expense of addressing other matters.

It is anything but clear which side would pay the steepest political price if the government does indeed run out of money a year to the day after Mr. Trump took office. But Democrats appear poised to force the issue.

Senator Mazie K. Hirono, Democrat of Hawaii, complained that Republicans had waited until the last minute to address the fate of the young immigrants and to deal with other pressing issues.

“But no, they have to fool around with giving the richest people in our country and the corporations huge, huge tax breaks,” she said. “That’s what they were running around doing in the dark of night. You think I’m a little upset? Damn right I am.”

Continue reading the main story

Mr. Trump is not making it easier for congressional Republicans. The perilous day on Capitol Hill began with the president firing off a Twitter message that undermined his party’s strategy to keep the government open. Republican leaders had spent Wednesday pressuring Democrats to vote for the spending bill, arguing that opposing it would effectively block the extension of the child health program, known as CHIP, which they had included in the spending bill. Funding for the program lapsed at the end of September.

Yet on Thursday morning, Mr. Trump suggested that the funding should not be part of the stopgap bill, writing on Twitter: “CHIP should be part of a long term solution, not a 30 Day, or short term, extension!”

Hours after Mr. Trump’s message, the administration tried to walk it back. A White House spokesman said that the president supported the stopgap bill.

But Democrats pressed their advantage. Mr. Schumer brought up the tweet and questioned whether it meant that the president opposed the stopgap measure that congressional leaders from his own party were trying to pass.

“Who knows?” Mr. Schumer said. “It’s a mess.”

Representative Nancy Pelosi of California, the Democratic leader, made clear that she was unmoved by the inclusion of CHIP funding in the stopgap bill.

“This is like giving you a bowl of doggy doo, put a cherry on top and call it a chocolate sundae,” she said.

In a sign of the growing opposition, Virginia’s two Democratic senators, Mark Warner and Tim Kaine, whose constituents include hundreds of thousands of federal workers, announced that they, too, would oppose the temporary spending bill in the Senate.

“Congress should remain in session with no recess until we work out a long-term bipartisan budget deal that addresses all issues,” Mr. Warner and Mr. Kaine said in a joint statement.

Continue reading the main story

If Senate Republicans were unified in support and continued to lack the vote of Senator John McCain of Arizona, they would still need at least 10 Democrats to join them for the bill to succeed in that chamber. With a few expected Republican defections, that number would grow even larger.

Against that darkening backdrop, House leaders pressed forward with a planned vote on the temporary spending bill.

Not only were Democrats opposed, but many members of the House Freedom Caucus, a group of hard-line conservatives, had reservations. Earlier in the day, Representative Mark Meadows of North Carolina, the leader of the Freedom Caucus, expressed frustration that Congress was looking to pass its fourth stopgap spending measure for the 2018 fiscal year.

“Three strikes, you’re out,” he said, adding, “I guess the speaker has the best plan, and so we’ll just see how that works out.”

But shortly before the vote on Thursday night, the Freedom Caucus announced that it had decided to support the stopgap bill, having extracted other concessions from the House speaker, Paul D. Ryan of Wisconsin.

Traveling in Pennsylvania, Mr. Trump accused Democrats of provoking a shutdown to drown out discussion of the Republican tax overhaul.

“I think the Democrats would like to see a shutdown in order to get off that subject,” Mr. Trump told reporters before delivering a speech.

Eighteen members of the Senate Democratic caucus voted for the last stopgap measure in December. But many of those members have already said they would oppose the latest bill, including Mr. Warner, Mr. Kaine, Senator Patrick J. Leahy of Vermont and Senator Jon Tester of Montana.

Continue reading the main story

Mr. Tester, who is up for re-election this year in a state that Mr. Trump won by 20 percentage points, denounced the stopgap bill as a “disgrace.”

“We keep doing patches and patches and patches and I’m done,” he said, adding: “We have to do our job, for God’s sake! People need predictability in government.”

Lawmakers were growing frustrated.

“I don’t want to play shutdown politics,” said Senator Cory Gardner of Colorado, chairman of the National Republican Senatorial Committee. “I think it’s a bad idea and a pox on both parties.”