Some call it the resistance; others label it the herbal tea party.

Whatever the name, liberal insurgents demanding a more confrontational approach to President Trump and his Republican allies upended the Democratic establishment last week. From Boston’s Charles River to the Senate committee rooms at the Capitol, from Chicago’s City Hall to Delaware’s beaches, veteran Democrats found themselves under fire from political newcomers or upstaged by junior colleagues.

The moments suggested that Democrats are now in the throes of something resembling what Republicans went through eight years ago. That’s when the tea party began to seize control of the GOP in a manner that still wreaks havoc within the House and Senate caucuses.

For Democrats, the first blow came Tuesday night when Boston City Council member Ayanna Pressley, 44, routed one of the party’s most reliably liberal incumbents, Rep. Michael E. Capuano (Mass.), in a primary. In Chicago, Mayor Rahm Emanuel, who once aspired to build a Daley-style rein in that city, bowed out of his reelection bid in the face of a crowded field of liberal challengers and continued protests against the police department.

With Democrats eyeing the 2018 elections as a chance for a blue wave, here's how they're fighting to win the 24 seats they need to take control of the House. (Jenny Starrs/The Washington Post)

Two days later, in Delaware, Sen. Thomas R. Carper (D) fought off an insurgent liberal who had almost no money and no political history but gave him his toughest race since winning his seat 18 years ago.

“The political establishment has gotten us Donald Trump, it’s gotten us the worst political position for the Democratic Party since the 1920s. We need change, and change is coming,” said Rep. Seth Moulton (D-Mass.), a thorn in his leadership’s side who himself first won office by defeating an 18-year incumbent four years ago.

This new dynamic crystallized in the Senate Judiciary Committee’s confirmation hearings for Judge Brett M. Kavanaugh’s nomination to the Supreme Court. They began Tuesday with the most junior member of the panel, Sen. Kamala D. Harris (D-Calif.), challenging the 84-year-old chairman, Sen. Charles E. Grassley (R-Iowa), over his handling of the voluminous documents from Kavanaugh’s tenure at the George W. Bush White House.

The hearings concluded Friday amid debate about whether Sen. Cory Booker (D-N.J.), the second-most junior member, should face an ethics investigation into his unauthorized release of some documents that had been labeled confidential.

Off Capitol Hill, liberal activists, led by a onetime acolyte of Senate Minority Leader Charles E. Schumer (D-N.Y.), hectored the committee’s ranking Democrat, Sen. Dianne Feinstein (Calif.), for not being aggressive enough in her clashes with Grassley. Protesters interrupted four days of hearings, leading to 227 arrests by U.S. Capitol Police.

None of these actions has likely hurt Democrats ahead of the 2018 midterm elections, in which they continue to be in a strong position to fight for the House majority and have an outside chance at the Senate majority. Indeed, some of these moves might have further energized the already motivated liberal base of voters to turn out in November.

But, taken together, these actions demonstrate that a mentality might be building in opposition to Trump that is similar to what took firm hold among Republicans during the run-up to the 2010 midterm elections.

Back then, ideology was no longer defined by traditional conservative policies such as free trade and strong national security. Those positions got trumped by emotional conservatism — whoever espoused the loudest, most confrontational approach toward opposing President Barack Obama’s administration got the most attention, even if their idea had no chance at success.

Yes, the pun was intended, as Trump and his sometimes nonconservative positions came to redefine the Republican Party.

The response to Trump could create a mirror image where emotional confrontation, regardless of the likelihood of success, becomes the coin of the liberal realm.

Take the Kavanaugh hearings. Some leaders of the coalition opposing the judge sharply criticized Feinstein and other Democrats for even participating in the hearings.

A walkout of the hearings might have created a temporary good feeling — a triumph for emotional liberalism — but it would not have slowed Kavanaugh’s confirmation.

In fact, Republicans, then in the minority, made the exact same threat in June 2010 ahead of Justice Elena Kagan’s confirmation hearings.

Schumer has been trying to protect the interests of a handful of Democrats in states that voted heavily for Trump in 2016, several of whom may vote to confirm Kavanaugh. Liberal activists have made it clear they will blame Schumer for any defections on the vote, and that’s prompted some allies to defend him.

“Charles E. Schumer has a hard job,” Sen. Elizabeth Warren (D-Mass.), a favorite of the base, told reporters Thursday. “But he held us together in health-care debates. He held us together in tax debates. And made clear the difference between Republicans, who are willing to make this government work only for the rich and powerful.”

Across the Capitol, House Minority Leader Nancy Pelosi (D-Calif.) finds herself in a weakened position as dozens of House candidates have vowed to oppose her bid for speaker if Democrats win the majority. Some of those challengers are in Trump-leaning districts and are making calculated moves to appeal to conservative voters.

But upstarts such as Pressley and Alexandria Ocasio-Cortez, 28, who stunned Democrats by defeating 20-year congressman Joseph Crowley in a New York Democratic primary, are also withholding support from Pelosi.

These Young Turks have created a slow boil among senior Democrats who question whether the newcomers have the capacity to run Congress at such a momentous time. “Young men are called because they are strong, old men because they know the way. Our leadership has to have a healthy mix of both,” Rep. James E. Clyburn (S.C.), No. 3 in the Democratic House leadership, said in a recent interview.

Republican leaders know well that the most dangerous intraparty rivals are not in competitive swing districts but in the safest GOP-leaning districts. Tea party groups intentionally focused on trying to elect the most confrontational lawmakers in solid Republican districts, and from that effort came the House Freedom Caucus.

Those far-right lawmakers drove the federal government into a shutdown in October 2013 and helped oust John A. Boehner (R-Ohio) from the speaker’s office two years later. They are threatening to support another government shutdown this fall.

Moulton believes that, if they win the majority, Democrats will avoid those pitfalls — but only because Democrats tend to support the federal government.

“The tea party tries to destroy government,” he said. “We need to restore faith in government. Sometimes that means being willing to go against the establishment, but that doesn’t mean tearing apart the institutions.”