When thousands of furious, screaming protesters marched toward the Capitol over the weekend as Justice Brett Kavanaugh was confirmed, Republican staffers peered out at the scene from the windows above. They were not alarmed but elated.

Weeks ahead of the midterm elections, Republicans have cast the Trump resistance movement as “an angry mob,” a term used by many of them to describe a faceless amalgamation of forces that they say threaten the country’s order and, they hope, energize their voters.

President Donald Trump and the GOP firmly control Congress and the White House and have massive financial and media infrastructure behind them. But in an effort to flip the midterm elections from a referendum on the unpopular president, they are casting themselves as defenders at the barricades.

In Virginia, Rep. David Brat, R, is running against the “liberal mob,” and GOP Senate candidate Corey Stewart has decried the “mob tactics” that “tried to destroy” Kavanaugh.

“When we’re out at grocery stores or at events, we’re finding swing voters are turned off by how Kavanaugh was treated,” Rep. Peter King, R-N.Y., said. “Chasing senators down the hall, running up the stairs at the Capitol – we’ve been taken aback by how people have reacted to it. And we’re responding.”

The characterization evokes fear of an unknown and out-of-control mass of people, and it taps into grievances about the nation’s fast-moving cultural and demographic shifts that Republicans say are working against them. With its emphasis on the impact on traditional values and white voters, particularly men, it strikes the same notes as earlier Trump-fanned attention to immigrants, MS-13 gang members and African-American football players protesting police treatment of young black men.

The new front is a modern incarnation of the law-and-order thrusts Republicans have used before in tough campaigns, most notably 50 years ago, when Richard Nixon used the specter of rioting at the Democratic National Convention to cast the opposing party as the tool of antiwar protesters and violent malcontents.

This time, the GOP’s foil is composed of leftists, elitists and feminists, of academics and celebrities, of Trump nemesis Michael Avenatti, philanthropist George Soros and Rep. Maxine Waters, D-Calif., who has called for the president’s impeachment.

The turn toward a culture war is also a tacit admission that many of the issues that Republicans had sought to run on, from tax cuts to the upbeat state of the economy, have not been enough to fan GOP voters’ enthusiasm and counter an electrified Democratic electorate.

“It’s aimed at firing up Fox viewers and the more strident elements of Trump’s base; it’s fearmongering,” said John Weaver, a longtime Republican strategist who is a frequent Trump critic. “I’m sure there is some little old lady in Iowa who now keeps her doors locked because she thinks there’s going to be some anarchist mob coming through Davenport.”

Weaver noted that many of the marches that have cropped up since Trump’s inauguration have been led by suburban women or young Americans focused on issues important to voters, such as gun safety or science.

“They want to take the freedom to assemble and turn it into a negative,” Weaver said. ” ‘The mob’ is trying to dehumanize and belittle and dismiss the current activism that we’re seeing around the country.”

The groundwork to cast Democrats as angry and out of control has been months in the making.

Earlier this year, when White House press secretary Sarah Huckabee Sanders was denied service at a Virginia restaurant and when Department of Homeland Security Secretary Kirstjen Nielsen was heckled by protesters at a Mexican restaurant, Republicans cast Democrats as overreacting and unable to withhold their animus toward Trump.

It was not until the days leading up to and following Kavanaugh’s controversial confirmation that Republicans, one after another, adopted the same terminology.

“They have encouraged mob rule,” Chuck Grassley, R-Iowa, said on the Senate floor Friday. Sen. Orrin Hatch, R-Utah, said there was “a paid mob trying to prevent senators from doing the will of their constituents,” while Sen. Marco Rubio, R-Fla., wondered on twitter: “Imagine the coverage on cable news if an angry mob of conservatives stormed the steps of the Supreme Court building.”

Senate Majority Leader Mitch McConnell, R-Ky., touted: “We stood up to the mob.”

At his Saturday night rally in Topeka, Kansas, Trump joined in, asserting that “the radical Democrats have turned into an angry mob.”

Many Republican candidates have received sudden bursts of support when caught in the maelstrom of the nation’s charged politics.

When Sen. Ted Cruz, R-Texas, and his wife, Heidi, were confronted by protesters at an Italian restaurant in Washington last month – as Kavanaugh’s nomination was teetering amid sexual assault allegations – the grim-faced couple quickly ducked out as activists chanted, “We believe survivors!”

But when video of the episode was uploaded and went viral, it boosted Cruz, rather than his critics.

Republican strategist Jeff Roe, who is advising Cruz’s hotly contested reelection bid, said that September day was the campaign’s biggest fundraising day of the year – and noted that the influx was unsolicited and a visceral response to the way Cruz was treated.

“Their tactics are too hot. They insult Republicans and turn off independents even more than the prospect of impeachment does,” Roe said, adding that other GOP candidates he’s advising are also taking aim at Democrats as a mob-like party.

“We’ve used it everywhere because it’s effective,” Roe said.

Brat’s new ad shows a crowd sitting in an auditorium shouting back answers to his questions. His campaign cited his Democratic opponent as it tweeted: “Abigail Spanberger sits in front row at Dave Brat town hall agreeing with the liberal mob attacking Dave Brat.”

Some veteran Republicans criticized the party’s approach as too vague.

Karl Rove, a former top adviser to George W. Bush, said Republicans should focus on how Democrats handled the Kavanaugh nomination.

“The mob is a useful thing to talk about, but it’s more important to say the Democrats fundamentally broke the process,” Rove said. “Their unsubstantiated and embarrassing attacks made it a chaotic disaster, and Republicans should be critical of that.”

Other Republicans expressed concern that the political terrain can swiftly change.

“We shouldn’t be spiking the football and saying we are winning and the blue wave is over,” said Republican pollster Jim McLaughlin, who emphasized that much can still change before Election Day. “What we should be saying is, they are a bunch of radical leftists. They are the same people that want to raise your taxes and who want open borders.”

The GOP fervor extends across the Internet. In recent days, a short video of a heated moment among protesters on Capitol Hill during the Kavanaugh confirmation vote – titled “Leftists harassing an elderly Trump supporter. More footage for Trump 2020 ads.” – was shared by nearly 20,000 people on Twitter. And videos of protesters walking through the streets of Portland, Oregon, were shared by thousands of alarmed conservatives.

“This is what happens when we don’t share the risk, and face down the mob,” tweeted Fox News host Greg Gutfeld.

Democrats, however, have balked at the GOP’s attempts to define the Trump resistance movement, arguing that it’s simply a movement by people appalled by Republican policies.

Neera Tanden, who runs the Center for American Progress, a liberal think tank, has changed her Twitter account’s name to “Women’s Mob” alongside an emoji of a blue wave as a way of countering the Republican argument.

“They clearly need a way to juice turnout, but the women who protested against Kavanaugh are women who have experienced sexual assault, who are mothers. The resistance to Trump is predominantly college-educated women,” Tanden said. “Donald Trump may want to wage a culture war, but attacking women writ large is attacking 50 percent of the population.”

Jessica Campbell-Swanson, a 35-year-old from Denver, flew to Washington last week to lobby Sen. Cory Gardner, R-Colo., with a nonprofit group, End Rape on Campus. She was among those outside the Supreme Court, protesting as Senate Republican staffers peered down.

“Brett Kavanaugh was allowed to be angry, and they were fine with that,” she said. “We have a right to be angry. We’re not a mob. We weren’t violent. We were completely nonviolent.”