“The president told him to go back and talk to Paul Ryan and Mitch McConnell and work it out,” Mr. Cornyn said, referring to the House speaker and Senate majority leader.
Senate Democrats still held out hope that Mr. Trump, scorched by the firestorm prompted by his vulgar, racially tinged comments on Africa last week, would be willing to make concessions.
“Republicans control the House, they control the Senate and they control the presidency,” said Senator Patrick J. Leahy, Democrat of Vermont. “The government stays open if they want it to stay open, and it shuts down if they want it to shut down. It’s time to stop kicking the can down the road and time to start negotiating in good faith.”
It was unclear when or if a vote would even be held, as each party prepared to blame the other for a shutdown.
On the Senate floor, Democrats delivered speeches in front of a huge placard that blared: “Trump Shutdown.” But at the White House, Mr. Trump’s budget director, Mick Mulvaney, said the Trump administration is preparing for “what we’re calling the ‘Schumer shutdown.’”
But tempers were flaring within the Republican Party as well. Senator Lindsey Graham of South Carolina, a moderate Republican on immigration who has been trying to broker a deal with Democrats, laced into Senator Tom Cotton of Arkansas on Friday, deriding him as “the Steve King of the Senate” in an interview with NBC, a reference to the Iowa House member who is perhaps the most virulent anti-immigrant voice in Congress.
Mr. Cotton, who has helped thwart Mr. Graham’s negotiations, retorted with Mr. Graham’s failed 2016 presidential bid.
“The difference between Steve King and Lindsey Graham is that Steve King can actually win an election in Iowa,” Mr. Cotton told reporters.
Mr. Cotton went on to argue that it was Mr. Trump’s views on immigration that powered him to the Republican Party’s nominee, while Mr. Graham was relegated to the “kiddie table” at the primary debates.
Across the Capitol, House Republican leaders pressured Senate Democrats to capitulate and give their blessing to the stopgap measure.
“Make no mistake about it: Senate Democrats are the only ones standing in the way of a fully funded government and a reauthorized health insurance program for children,” Speaker Paul D. Ryan of Wisconsin said. “This is no time to play politics and force a shutdown. The House has done its job.”
House Republican leaders told their members late Friday morning that they could go home, but advised them to ‘‘remain flexible,’’ in case the Senate reaches a spending agreement and sends the House a spending bill. Democrats called the move irresponsible.
“We should stay here and be prepared to act at a moment’s notice,’’ said Representative Dan Kildee, Democrat of Michigan.
Mr. Trump canceled plans to travel to his Florida resort on Friday and will stay in Washington until a spending bill is passed, a White House official said Friday morning.
In an early-morning Twitter post on Friday, Mr. Trump put pressure on Democrats to keep the federal government open.
Marc Short, the White House director of legislative affairs, told reporters he had last spoken to the president on Thursday night and that Mr. Trump was making calls to try to negotiate a deal. Mr. Short would not say whom the president had called.
“We’re trying to keep it open,” Mr. Short said.
Still, with great uncertainty on Capitol Hill, the government began bracing for a shutdown. National parks will remain open even if the government shuts down, the Department of Interior announced Thursday in a move that could help assuage public anger at Republicans if Congress fails to agree to a budget. The Defense Department, however, warned that military personnel would not be paid until Congress makes funds available.
If Democrats vote the stopgap bill down, the move would hold undeniable risks. Ten Senate Democrats are running for re-election in states that Mr. Trump won in 2016, and many of those states — such as Indiana, Missouri, North Dakota and West Virginia — may hold little sympathy for one of the primary causes of the looming shutdown: protecting young undocumented immigrants known as Dreamers.
The Senate convened at 11 a.m. Friday, and the Senate chaplain, Barry C. Black, alluded to the possible shutdown in his opening prayer. “As the clock ticks toward another deadline,” he said, “inspire our lawmakers to be instruments of your purposes.”
The Senate majority leader, Mitch McConnell of Kentucky, warned that the Senate was “just hours away from an entirely avoidable government shutdown,” and placed the blame squarely on his Democratic counterpart, Mr. Schumer.
“This vote should be a no-brainer,” Mr. McConnell said, “and it would be, except the Democratic leader has convinced his members to filibuster any funding bill that doesn’t include legislation they are demanding for people who came into the United States illegally.”
The stopgap bill, which passed the House by a vote of 230 to 197, would keep the government open for a month, provide funding for the Children’s Health Insurance Program for six years and delay or suspend a handful of taxes imposed by the Affordable Care Act.
At least about a dozen Senate Democratic votes will probably be needed to approve the measure because some Republican senators are expected to vote no and Senator John McCain, Republican of Arizona, is absent.
The standoff on immigration dates back to September, when Mr. Trump moved to end an Obama-era program called Deferred Action for Childhood Arrivals, or DACA, which shields the young immigrants from deportation. Democrats have been eager to enshrine into law protections for those immigrants.
At the same time, congressional leaders from both parties have been trying to reach an agreement to raise strict limits on domestic and military spending, a deal that would pave the way for a long-term spending package. So far this fiscal year, they have relied on stopgap measures to keep the government funded.
But negotiations have been fitful and grew only 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 introduced a resolution to censure the president for his words.
By the end of Thursday, it was still far from clear how the political blame would be divvied up if the government does shut down on Saturday, the anniversary of Mr. Trump’s inauguration. But Democrats seemed eager to force the issue.
“At some point, Congress needs to do better than government-by-crisis, short-term fixes, and sidestepping difficult issues. That time is now,” said Senator Chris Coons, Democrat of Delaware. “I still believe we can keep the government open, solve the issues we’ve failed to address for several months and govern this country the way the American people expect us to, but the short-term bill that House Republicans passed tonight simply doesn’t meet the test of basic governance.”