Though federal shutdowns have become a depressingly familiar ritual of American politics, the current one was born of a newer, more toxic dynamic — one in which the old partisan arguments about the size and role of government have been supplanted by a tribal battle over what it means to be an American.

The tactics are the same, and in some ways the culmination of a no-compromise, winner-take-all approach that has been taking root since at least as far back as the rise of the tea party movement. A deeply polarized political climate demands both sides play to their most ideological and rigid partisans.

So the conditions were there for yet another shutdown. But the match that ignited the kindling was a single comment: President Trump's racially charged suggestion that "shithole countries" such as Haiti and those from Africa produce undesirable immigrants.

The scene on Capitol Hill as the government shuts down

With only a day to work out the details and get the votes to avoid a government shutdown, Senate Minority Leader Charles E. Schumer (D-N.Y.) speaks to journalists as he returns from a meeting with President Trump at the White House.

The remark offered a vivid ­illustration of how a standoff ­ostensibly focused on spending had morphed into a different kind of battle. That conflict now pits the nativist impulses unleashed by Trump's presidential campaign, and now embraced by his party at large, against the demands of a Democratic base that more ­reflects and embraces an increasingly diverse nation.

"What's at stake in the immigration fight is a clash between two visions of our future — or if you want to be literal about it, a clash between our future and our past," said William A. Galston, a senior fellow at the Brookings Institution who worked in the Clinton administration. "Both sides have pushed a large pile of chips on the table."

Democrats have insisted their leaders dig in on extending an Obama-era program, known as Deferred Action for Childhood Arrivals (DACA), offering protection against deportation to an estimated 800,000 undocumented immigrants brought to this country as children. The president demanded funding for his proposed border wall and other security measures.

The political ramifications are not entirely obvious, notwithstanding the hashtag war branding the impasse either the #schumershutdown, laying responsibility on Senate Minority Leader Charles E. Schumer (D-N.Y.), or the #trumpshutdown.

Who gets the blame — or if voters will even care about the shutdown by the time Election Day rolls around — remains to be seen. Much will depend on how long it lasts and whether it damages the economy.

While polls show large majorities are sympathetic to the plight of the young undocumented immigrants, most also say keeping the government open is a higher priority. The wall, on the other hand, is largely unpopular outside Trump's base.

"There's almost certainly a partisan filter for how people perceive this," said Steven Law, who heads the Senate Leadership Fund, a well-funded super PAC tied to Senate Majority Leader Mitch McConnell (R-Ky.). "At worst, from my perspective, it will end up being a wash. This won't be like past shutdowns."

Shutdowns for a generation have been fought around the traditional partisan divides over federal spending and the government's role in American life. Most notable among them have been the ones in 1995 and 1996, and in 2013.

The balance of power was very different in those years. Both of the earlier shutdowns came at a time of divided government, with Democrats controlling the White House, and Republicans running Congress. And both turned out poorly for the Republicans.

The current deadlock is happening as — and because — the two parties are in the process of reorienting themselves in ways their top strategists once warned against.

That in turn reflects the shifting attitudes among their voters. When the Pew Research Center asked Americans in 1994 if "immigrants strengthen the country because of their hard work and talents" there was almost no partisan difference in the responses — 32 percent of Democratic-leaning voters and 30 percent of Republican-leaning voters answered yes.

But that same question reveals an enormous political divide. In the summer of 2017, 84 percent on the Democratic side agreed that immigrants were a strength, compared with 42 percent on the Republican side — a gap of 42 points.

As recently as a decade ago, Democrats were leery of looking too permissive on immigration, and anxious to avoid election-year attacks over giving government benefits to the undocumented.

The Democratic stance on immigration is now defined from the increasingly impatient left. Protesters who support a path to citizenship have in recent years made their mark by disrupting events by leaders like President Barack Obama and House Minority Leader Nancy Pelosi (D-Calif.).

"It is a remarkable shift to see Democrats are leaning into the issue," said Frank Sharry, the leader of America's Voice, a liberal organization that supports a path to citizenship for the undocumented. "The Democratic Party is seeing people of color as full and equal parts of the coalition rather than communities that are more important come election time and less important when it comes to legislation."

Conservative activists have also been cheered by the dramatic shift in Republican focus, which has followed the White House's embrace of nativist language that casts the standoff as a choice between government funding for "lawful citizens" and the "reckless demands" of "unlawful immigrants."

"Even two or three years ago, you couldn't have gotten away with being hard line on immigration," said Ed Martin, a former chairman of the Missouri Republican Party who now runs Phyllis Schlafly Eagles, a group that advocates for immigration restrictions. "That wasn't the position that was palatable to the Republican donor class and the establishment."

But Trump proved in the 2016 election that immigration unified the GOP much more effectively than did its traditional focus on reducing entitlement spending, free trade and low deficits. Among the GOP base, the populist issues of trade and immigration are now far more animating than even abortion or taxes, Martin said.

"For the Republicans that's helpful, because I have never thought that the populist movement would be able to understand the tax cuts as well as immigration," he said.

Rick Manning, the president of Americans for Limited Government, agrees that immigration has become a front-burner question for the Republican base, and will likely prove decisive in GOP turnout this November.

"If Donald Trump signs a DACA deal, caves on this thing, on the one-year anniversary of his presidency, it ends his presidency for all intents and purposes," Manning said. "There is no reason for the blue collar Democrats who voted for Trump last time to come out again."

Former House speaker Newt Gingrich (R-Ga.), who led his party into the 1995 and 1996 shutdown over government spending, says Republicans have set up this confrontation as a midterm winner. The GOP will cast the Democrats as more focused on identity politics than the national interests, like funding the military, Gingrich predicted.

"This is a decision by the Democrats that their future absolutely requires them to polarize the Latino vote," he added.

Democrats, meanwhile, are betting it will be the Republicans who find themselves estranged and isolated.

"They are living through a Trumpian period of ethnic nationalism and populism," Sharry said. "That clearly works for a majority of their party. But the majority of the country is much more in line with where the Democrats are."