In the fall of 2013, Republican hard-liners engineered a 16-day shutdown of the federal government, implausibly insisting that President Barack Obama acquiesce to their demand that the Affordable Care Act be stripped of all funding.
The gambit failed miserably. The Republican Party’s already low standing in public opinion polls plunged further. Mr. Obama and Democratic lawmakers were widely seen as victorious.
Then the following November, something happened that plainly informed the moves of Democrats today as they drove the government toward another shutdown: Voters handed Republicans overwhelming victories and a Senate majority — in large part because of dissatisfaction with the man in the White House. The shutdown was a distant memory.
“I don’t think anybody paid a big price for it,” Senator Joe Manchin III, a West Virginia Democrat who is facing a competitive re-election race this fall, said of the 2014 election.
For Democrats on the ballot in many of the states that President Trump carried, the fresh government shutdown is unmistakably perilous, especially if it is seen as a strong-armed move to protect undocumented immigrants brought to this country illegally as children. And Mr. Manchin vote to keep the government open, as did four other Trump-state Democrats.
But that was not enough to stop the first shuttering of the government since that 2013 showdown. In the runup, Democrats betrayed little nervousness about pushing a shutdown, because they believe any immediate backlash will be long forgotten in a midterm election destined to revolve around another, even more polarizing president.
If voters had forgotten the shutdown months later in 2013, they may forget it even more quickly in 2018. In the dizzying news cycle of the Trump era, voters can hardly remember what happened a few days ago.
Mr. Trump is not just historically unpopular; he is also central to voter perceptions of the Republican Party — a lesson Republicans ruefully learned in the electoral wipeouts they suffered in Virginia and New Jersey last November.
An NBC News-Wall Street Journal poll released Friday found that 38 percent of voters said they wanted to send a message of opposition to Mr. Trump with their midterm vote, the highest figure making such a statement since Democrats reclaimed both chambers of Congress in 2006.
The shutdown of 2013 and another in 1995 featured a deft Democratic politician in the White House who skillfully directed voter anger to the Republicans in Congress. President Bill Clinton was able to blame Newt Gingrich, the House speaker at the time, even after he vetoed spending bills that would have kept the government open.
This time around, Democrats in Congress are confident that they can rely on Mr. Trump’s inevitable outbursts to motivate their base and win over moderates. That confidence has emboldened Democrats to engage in some brinkmanship that they may have steered away from with a less bombastic figure in the White House.
“The president is going to figure in almost every voter’s mind in the midterms,” said Senator Brian Schatz, Democrat of Hawaii, adding: “Democrats have learned that it’s not in our interest and it’s not consistent with our values to constantly get rolled.”
Nor is it so politically daring when they are facing an opposition that spent much of Thursday deploying an alliterative hashtag, #schumershutdown, to try to pin the blame for a shutdown on Senator Chuck Schumer, the Democratic leader, only to see Mr. Trump summon the would-be boogeyman to a White House meeting on Friday without any Republican lawmakers present.
Congressional Republicans could only chuckle about the uncertain staying power of their newly hatched slogan.
“I’m not sure what the recycling life on a hashtag is,” said Representative K. Michael Conaway, Republican of Texas.
Mr. Trump did not wind up devising an agreement of his own with Mr. Schumer during their 90-minute one-on-one in the West Wing. But the president’s unilateral decision to enter into his own negotiation was a reminder to Republicans that their president is effectively a political free agent who acts more on whim, and with an eye toward media coverage, than any fixed worldview.
Asked if he was alarmed about Mr. Trump’s meeting with Mr. Schumer alone, Senator Roy Blunt of Missouri was succinct: “Yes.”
This is not to say that Senate Democrats, particularly those running this fall in the heavily white states that Mr. Trump swept in 2016, do not face any risk in a shutdown, especially if it is seen as revolving largely around protecting the young undocumented immigrants known as Dreamers.
Polling done by a Democratic “super PAC,” the Senate Majority PAC, revealed that in Indiana, Missouri, Montana, North Dakota and West Virginia, voters would fault Democrats if DACA, the program shielding the young immigrants from deportation, is what prompted the crisis.
Senate Democrats are up for re-election in each of the five states, and if the party does not hold nearly all of the seats, it has no chance to net the two seats necessary to claim the majority.
“They’ve kind of gotten out over their skis,” Senator John Cornyn of Texas, the second-ranking Republican, said of Democrats. “Everybody realizes this is all about immigration.”
And Republicans were heartened by a CNN survey released Friday showing that far more Americans believe it is more important to avoid a government shutdown than continue DACA.
Yet every poll indicates that voters would blame Republicans if Congress does not keep the government open, and veteran party officials concede that they would face a communications challenge in making the case that they were not responsible for a shutdown.