Democrats have been sharpening their attacks on Republicans over the pandemic, former president Donald Trump and other polarizing topics, and now, emboldened by victory in California’s recall election, party leaders are seeking to further escalate hostilities ahead of the midterm elections.

Beyond prompting a collective sigh of relief in a party reeling from a difficult summer, Gov. Gavin Newsom’s Tuesday win served as the first test of a revamped campaign strategy that Democrats quietly began assembling weeks ago, amid a realization that positive talk about President Biden getting the country back on track had run into the harsh realities of a delta variant coronavirus surge.

Chastened by the resurgence, the difficult Afghanistan withdrawal and declining public confidence in Biden’s handling of the pandemic and other issues, Democrats have gone on offense against the GOP, following private summer polling that showed broad and growing anger at the Republican resistance to vaccination, according to Democrats familiar with the discussions who like others spoke on the condition of anonymity to discuss strategy.

Now, Democrats are openly touting vaccine mandates they once shied away from — and chastising Republicans who oppose them. They are delivering sharper criticisms of the motives of the unvaccinated, a group that is largely Republican, and spending much more time talking about Trump. A year after Biden won the presidency on a promise of uniting the country, Democrats have embraced a far more divisive set of talking points that casts their opponents as threats to the country.

“The contrast is going to be clear as we move into 2022,” Democratic National Committee Chairman Jaime Harrison told reporters Wednesday. “The contrast between folks who are card-carrying members of Trumpism and folks who are Americans through and through and are fighting for this country.”

The Democratic approach sets the stage for a bitter midterm campaign in which Republicans have already launched searing broadsides of their own on several fronts. They have cast Democrats as socialists because of their ambitious government spending proposals. They have seized on the increase in violent crime and a surge of migrants at the southern border to question Biden’s control of the country. And they have focused relentless attention on the administration’s chaotic withdrawal from Afghanistan.

“I don’t think a recall election in California means much at all,” said Sen. Roy Blunt (R-Mo.). “I think there’s a series of things developing,” he added, that “should make 2022 a very good year for congressional Republican candidates.”

In effect, the nascent strategies suggest the midterms could pivot on one overarching question: Which party is more extreme?

While leaders in both parties cautioned against reading too much into an election in liberal-leaning California, Democratic officials say some of the tactics Newsom and his allies used to turn the tide in a race that once looked more competitive than where it ended up are instructive for gubernatorial races this fall in Virginia and New Jersey, as well as in next year’s midterms.

The strategy is meant to capitalize on anger and fear. Frustrations are mounting among vaccinated people who blame the unvaccinated for jeopardizing their safety. And anxieties are running high among many Americans about the prospects of Trump’s return, as he teases the possibility of running in 2024 and has cemented his position as the most influential figure in the Republican Party.

The emerging Democratic playbook for 2022 is a shift from the plan the party used to retake control of the House in the 2018 midterms. Sensing that anger with Trump was already widespread, Democratic candidates focused less on the president than on unpopular Republican proposals to repeal the Affordable Care Act and cut corporate taxes. They highlighted health care and infrastructure to draw in voters repelled by Trump but not usually accustomed to voting for Democrats.

But this year, one of the chief worries in the party has been how to energize and excite voters in the post-Trump era. With Trump no longer in office, Democrats have concluded the onus is on them to inject him into the campaign. They proved in California that, at least in a staunchly Democratic state and at least with Republicans bearing some similarities to Trump on the ballot, they can turn out enough voters to win.

“All of you know that last year I got to run against the real Donald Trump,” Biden said at a rally for Newsom on Monday, prompting loud boos. “Well, this year the leading Republican running for governor is the closest thing to a Trump clone that I’ve ever seen in your state.”

He offered a virtually identical pitch in late July at a rally in Virginia for former governor Terry McAuliffe, declaring, “I ran against Donald Trump, and so is Terry.”

Not coincidentally, McAuliffe and Republican opponent Glenn Youngkin engaged in a Twitter spat Tuesday on the topic of vaccine mandates for school and health-care workers, which McAuliffe supports and Youngkin does not.

Throughout his first six months in office, Biden won high marks for his covid policies, as infection rates dropped, millions were vaccinated and daily life started to return to normal.

But in the summer, as the delta variant of the coronavirus triggered a resurgence, polls showed the public beginning to doubt his handling of the pandemic, which had long been his strongest issue. At first, Biden limited his criticism of Republican governors who sought to block preventive measures and implored the unvaccinated to get their shots.

Within weeks, however, the White House began embracing vaccine mandates and stricter masking recommendations it once said were not necessary, while targeting governors such as Republican Ron DeSantis of Florida for getting in the way of what public health officials were advocating. The White House adopted mandates on the basis of their policy merits and a desire to increase vaccinations and enhance safety, White House officials said.

“Democrats really had no choice to make the radicalization of the right a major issue in our politics because it actually is one of the most important issues in our politics,” said Democratic strategist Simon Rosenberg, who has been pushing a more aggressive strategy inside the party. “If anything, we are seeing an escalation of their radicalization not a de-escalation.”

In California, Newsom faced his own political challenges with the pandemic, drawing widespread criticism early on for dining with a group at a luxe restaurant after publicly advising against such activities. But he emphasized his vaccine and mask mandates in the final weeks of the race, which proved to be an effective strategy.

Just days after Newsom announced that health-care and education workers would be required to get vaccinated or submit to regular coronavirus tests, the “Stop the Republican Recall” committee began running ads that called the election a matter of “life and death,” warning that the GOP would put the state’s progress at risk.

Newsom’s most prominent Republican challenger was radio host Larry Elder, who, while vaccinated, told voters that he would repeal the mandates instituted by Newsom “before I have my first cup of tea” in the governor’s office. Newsom repeated that promise word for word at his own rallies.

“If 2020 was about Trump and never-Trump, 2022 may be about vaccinated and never vaccinated,” said Democratic strategist Jesse Ferguson, who has been working with several liberal efforts this year. “Both in polling and in focus groups, I think there has been a bunch of data points that show the anger at the choice made by the unvaccinated.”

Yet other data suggests the politics of the pandemic are far from settled. A narrow majority of Americans disapprove of Biden’s plan to mandate vaccines for millions of Americans, according to a Quinnipiac University poll. But by about a 2-to-1 margin, Americans also voiced support for requiring students, teachers and other school employees to wear masks — a move Biden has championed but many Republicans have rejected.

Preliminary exit polls in the California election were encouraging for Democrats, showing that about 6 in 10 voters — well over the percentage of registered Democrats — said Newsom’s pandemic policies were about right or not strict enough. The poll also showed strong support for vaccinations and masking in schools.

At the White House on Wednesday, Biden and his aides pivoted off Newsom’s win to continue trying to draw contrasts with Republicans.

“This vote is a resounding win for the approach that he and I share to beating the pandemic: strong vaccine requirements, strong steps to reopen schools safely, and strong plans to distribute real medicines — not fake treatments — to help those who get sick,” Biden said in a statement.

Republicans voiced strong disagreements about the implications of the California election, suggesting instead that it revealed the limits of Democrats’ abilities to run on their agenda. (The pandemic was the highest-ranking issue to California voters, the exit poll found.)

“Democrats are losing on the kitchen table issues most important to voters and are now being forced to campaign on blaming Republicans for the pandemic Joe Biden has failed to control,” National Republican Congressional Committee spokesman Michael McAdams said.

A White House official, who spoke on the condition of anonymity, said Democrats are expected to continue drawing the contrasts they did in California in future races, including the focus on Trump. The official said that promoting the Biden agenda and showing that government can work is also going to be part of the party’s message.

But many Democrats, particularly on Capitol Hill, have grown frustrated, believing that the party has not done an effective enough job articulating its accomplishments — or still needs to achieve other goals before it can present an effective argument to voters next year.

Democratic House members in the most vulnerable seats, for example, have made clear inside the party that they need to pass a substantial plan to lower prescription drug prices, a major issue in swing districts. Democrats from wealthier suburban swing districts in places like New York, New Jersey and California have made a similar case for restoring tax benefits cut under Trump for people who pay substantial state and local taxes.

The uncertainty surrounding the Democratic agenda has created a greater incentive for a more potent message anchored in defining the GOP in negative terms.

“The biggest issue for voters was the pandemic,” said Long Beach, Calif., Mayor Robert Garcia, a Democrat.

The California election came down to a simple question, he said: “Either we’re going to keep a governor who’s doing a great job under hard circumstances, or we’re going to elect a candidate who wants to repeal all the mandates and basically make school an unsafe place.”

Weigel reported from Los Angeles. Michael Scherer contributed to this report.