The ad had all the trappings of a left-wing boogeyman fever dream: “He’d defund the police, end Medicare, force you into socialized medicine, double your gas prices with a Green New Deal.”

“Cameron Webb: way too radical.”

The rhetoric, deployed against a Virginia Democratic candidate for a U.S. House seat, is exactly what Rep. Abigail Spanberger (D-Va.) was talking about last week when she told her colleagues they needed to avoid using language that became fodder for Republican attacks.

“We [need to] look at the things that they say about us,” Spanberger had said in the call with House Democrats, in audio obtained by The Washington Post. “Because whether we think it’s just an attack ad and that’s what it does . . . it doesn’t matter, because it works.”

Webb, a lawyer and physician who supports neither defunding police nor socialized medicine, lost to Republican Bob Good by five percentage points in a historically red Virginia congressional district.

Webb said President Trump’s presence on the ballot, and his mobilizing effect in southern parts of the state, was ultimately the greatest factor in his loss. But both he and Spanberger say the GOP’s favored earworm attacks on Democrats managed to shift the conversation in the 5th District race, while Spanberger said she also heard constantly from constituents concerned about police being defunded.

“We thought we neutralized [the defund the police attacks] with some of our own spots,” Webb said in an interview, referring to advertisements focused on law enforcement and his efforts to treat coronavirus patients during the pandemic. “But that did shift the conversation. And what it did is it brought more national discourse into our race here in the 5th as opposed to focusing on local issues.”

Democrats had high hopes that Webb’s credentials and major fundraising advantages could make him the first Democrat to flip the seat since 2008, especially because Republicans were divided over Good’s ouster of Rep. Denver Riggleman in a nominating convention.

Webb outperformed President-elect Joe Biden (D) by roughly three percentage points in the district, according to unofficial returns, indicating he did attract some crossover voters. But it wasn’t nearly enough.

To a lesser degree, Republicans also used “defund the police” rhetoric on Spanberger, who defeated state Del. Nick Freitas (R-Culpeper) by a narrow 2 percent of the vote, according to unofficial returns. They occasionally tried to link the former CIA officer with her freshman colleague, Rep. Alexandria Ocasio-Cortez (D-N.Y.), who does want to defund police and proudly identifies as a democratic socialist.

Spanberger “votes nearly as much with socialist AOC,” charged one attack ad from Club for Growth PAC, which spent millions helping Freitas. “Why would Spanberger take so much money from defund the police extremists if she truly cared about Virginia?”

Spanberger told her caucus Thursday that it needed to do an autopsy on how such attacks affected some of the vulnerable Democrats who lost their seats.

She said Democrats should avoid phrases like “defund the police” and instead explain policies they support more clearly to better protect themselves in 2022 — and posited that they should also “not ever use the word ‘socialist’ or ‘socialism’ ever again.”

Elaborating in an interview Tuesday, Spanberger said she was not placing blame on any particular candidate or idea but believes her comments have been mischaracterized as opposing certain progressive policies.

“The position I was stating was we have to better explain what we are for,” she said, contrasting specific police reforms, for example, with the phrase “defund the police.” “Here’s a phrase that doesn’t begin to represent what we’ve actually done. In the cause of equal justice, in the cause of police reform, we in the House of Representatives passed a good bill that every single Democrat voted for, as well as some Republicans.

“And yet if you were to say to your constituents, what is it they have done in the area of police reform? People just won’t necessarily be able to say, because the conversation has been consumed by slogans — and frankly they are also slogans that have been weaponized by our political opponents.”

Spanberger said the millions of dollars spent on “defund the police” attack ads against Webb indicated “there had to be some pollster or some strategist somewhere saying, ‘This is how we will beat that man.’ ”

Some, like House Majority Whip James E. Clyburn (D-S.C.) and Rep. Conor Lamb (D-Pa.) have agreed with Spanberger that slogans such as “defund the police,” as well as calls to ban fracking, for example, hurt Democrats. But others in the party’s more liberal wing said they felt like they were being blamed for losses, or that the voices of their constituents — many of them minorities — were being silenced.

“To be real, it sounds like you are saying stop pushing for what Black folks want,” Rep. Rashida Tlaib (D-Mich.) said to centrist colleagues on the call. Ocasio-Cortez, whose name and face hovered in the background of some GOP attack ads in Virginia, tweeted that the “ ‘progressivism is bad’ argument just doesn’t have any compelling evidence,” noting that many Democrats who co-sponsored Medicare-for-all or the Green New Deal won reelection.

“When it comes to ‘Defund’ & ‘Socialism’ attacks, people need to realize these are racial resentment attacks,” she wrote. “You’re not gonna make that go away. You can make it less effective.”

She added in an interview on CNN’s “State of the Union” that she was not denying that Republican rhetoric has been effective in hurting Democrats but said the party could be more resilient against the attacks — for example, with better digital campaigning.

In Virginia, at least, Webb, Spanberger and Rep. Elaine Luria all significantly outspent Republicans on digital advertising on Facebook, according to data from the social media giant. Webb spent roughly $234,000 to Good’s $19,000.

Luria, who also flipped a red district blue two years ago, faced somewhat different attacks from Republicans this campaign cycle, focused more on tax policy and her position on China. She also was able to attack her Republican challenger, Scott Taylor, over a lingering 2018 scandal.

“I think there is a broad diversity of views and that comes with members with very different backgrounds and districts that are very different,” she said, adding that she considers infighting among Democrats unhelpful.

“We’re all here to represent our districts, and that diversity is something that is a strength of the Democratic Party rather than something we should weaponize among ourselves.”

Rep. Don Beyer (D-Va.), who represents deep-blue Arlington and Alexandria, said he was skeptical about how much Republican attack ads truly hurt Democrats in swing districts, believing Trump’s mobilization of supporters was the most potent and obvious factor affecting those contests. Beyer also said Webb’s race — he would have been the first Black doctor ever elected to Congress — may have been a factor, especially given the racially polarized presidential campaign.

“Without Trump on the ticket, [Webb] might have been able to do better,” Beyer said. “Trump was bringing out the White working class, who in much of the South are still not going to be excited about a Black candidate. They may not consider themselves racist at all — I’m not trying to say that — but it is a subtle part of their world perspective.”

Luria also noted that the lines of the 5th District had been redrawn since 2008, the last time a Democrat won, so that they favored Republicans even more.

But when it came down to it, Webb said, he had to commend Good for sticking so closely to his pro-Trump messaging.

Webb, who observed strict social distancing precautions because of the pandemic, also said he wished he would have found more ways to get in front of voters safely. He felt especially constrained because he was potentially exposed to the virus when treating covid-19 patients in the University of Virginia hospital.

The source for many of the “defund” attacks against Webb stemmed from a television interview Webb gave this summer, when the Democrat expressed support for racial justice protesters and said the “defund the police” language that was flooding the streets then should be used “appropriately.” Thereafter, he found himself repeatedly denying that his comments amounted to support for defunding the police.

But Webb had no regrets about his words, saying he found it important in a conversation about racial justice to at the very least acknowledge the viewpoints of people across the district who both supported and opposed calls for “defunding” police.

“That’s something that is sometimes incompatible with our hot-mic politics, but it’s so important for us to be able to do from a healing perspective,” he said. “The key here is being able to hold space for the range of views that exist and say, how do we move forward?”