For indispensable reporting on the coronavirus crisis, the election, and more, subscribe to the Mother Jones Daily newsletter.

In 2006, a well connected Republican political consultant penned a warning to a party he feared was drifting toward the fringe.

“Past experience shows that policies that seek to penalize immigration harm my party,” he wrote. In the writer’s home state, the most recent Republican gubernatorial candidate “ran last-minute anti-immigration ads that didn’t move his numbers with swing voters and probably cost him important votes in the El Salvadoran, Guatemalan, and Nicaraguan enclaves of Northern Virginia.”

It was all a recipe for disaster. “Anti-immigration rhetoric is a political siren’s song, and Republicans must resist its lure by lashing ourselves to our party’s twin masts of freedom and growth, or our majority will crash on its shoals.”

The writer was Ed Gillespie, and on Tuesday, he proved his thesis. In a Virginia gubernatorial race that was expected to be far closer, the former Republican National Committee chairman lost handily to Democratic Lt. Gov. Ralph Northam, in the first swing-state contest of the Trump era. Gillespie sought to run a Donald Trump campaign without Donald Trump, filling mailboxes and television sets with ominous ads depicting tattooed gang members and Confederate monuments while presenting himself to audiences as a grinning, tax-cutting wonk. This strategy backfired, and Democrats held onto all three statewide offices and may even take back Virginia’s house of delegates.

It would be premature to call the election a death knell for Trumpism. (Hillary Clinton won Virginia, after all). But Gillespie’s unabashedly nativist strategy—his old Crossfire sparring partner, Gov. Terry McAuliffe, called it “racist”—suggests that the conservative movement as it exists today is on a collision-course with gravity.

Gillespie was in a bind going back to the primary, when he faced an unexpectedly stiff challenge from Trump’s former Virginia campaign co-chair, Corey Stewart. Stewart—who had been fired by the Trump campaign for being too much of a provocateur—hit on the idea of running against progressive activists and local politicians who advocated the removal of Confederate monuments in the state. He held a rally at the statue of Robert E. Lee in Charlottesville, three months before Neo-Nazis carrying torches did the same, and warned that Democrats who defaced such monuments were no better than ISIS. That Stewart was actually from Duluth only underscored the cynicism of the ploy, but it nearly worked—he came within a few percentage points of an upset and promised to make Gillespie’s life miserable the rest of the campaign.

Lesson learned. Gillespie, who is originally from New Jersey, embraced the Confederate monuments cause as his own late in the primary—it probably helped him sneak past Stewart—and ran hard on it in the campaign, sending out mailers and running digital ads accusing Northam of wanting to remove “our statues.” Trump, for his part, chimed in with a helpful Tweet announcing that Gillespie would protect “our heritage.” And in the process, he brought Stewart and his supporters back into the fold. Two weeks before the election, Stewart headlined an event in Virginia Beach aimed at Trump supporters that was attended by the party’s candidate for lieutenant governor, Jill Vogel. At the rally, Stewart called Democrats “crackheads,” “communists,” and “weirdos.” When I talked to Stewart after the rally in Virginia Beach last month, he claimed victory for having forced Gillespie’s hand on the issue. After all, the candidate he had once maligned as a “cuckservative” had come around.

But Gillespie followed the Trump model most closely on illegal immigration. Echoing an anti-gang push by the Trump administration, he accused Northam of aiming to shelter members of MS-13, because he had once cast a vote against a Republican bill to ban sanctuary cities. It was a weird argument to have—Virginia doesn’t have sanctuary cities to begin with and no one was really proposing to create any. But the ads weren’t about policy, they were about people. Some of the gang members depicted in the anti-MS-13 ads weren’t even part of MS-13. One of the photos wasn’t even taken in the United States—it was from a prison in El Salvador.

This version of Gillespie would have been unrecognizable to the author of Winning Right: Campaign Politics and Conservative Policies. But in 2017, Republicans don’t have much of a choice, in part because the adults in the room like Gillespie didn’t pull the plug when they had a chance. Now they can spurn their president and lose a primary, or they can stick with him and face a Democratic electorate that hasn’t been this motivated—in an off-year anyway—in years.

It’s almost hard to believe that just a few hours ago, pundits and reporters were speculating on which heads exactly might roll if the Democrats lost Virginia. There’s a parallel universe in which Northam, an Army doctor from the state’s rural Eastern Shore—fun fact: he claims to be the first person to dunk a basketball on the island of Tangier—suddenly offers Democrats a roadmap for finding their way out the wilderness. We don’t live in that universe, though. Notwithstanding his fumbling, last-minute rejection of sanctuary cities, Northam was just fine. The state is doing well, he could reasonably claim some responsibility for why it was doing well, and he had a kind of soft-spoken, Tidewater Mr. Rogers vibe that served him well on the campaign trail.

But Democrats didn’t win such a stunning victory because of the surprising persuasive powers of pediatricians. Democrats won a historic landslide because Democrats are historically pissed. Nowhere was that more true than in the race for control of Virginia’s house of delegates. Democratic control of the state’s lower chamber was mostly unthinkable prior to Tuesday. But there were signs that something was afoot. The party fielded candidates in more delegate races than in any year since 1981—a time when Democrats still held three quarters of the chamber—and those candidates, many of whom were political novices and millennials, came through in a big way. In the Richmond suburbs, Democrat Schuyler VanValkenburg, a high school political science teacher, won in a district where the party had only once fielded a candidate since 1997. Danica Roem, a transgender former journalist, unseated the GOP’s most notorious culture warrior in Manassas. A member of the Democratic Socialists of America unseated the Republican whip in the house of delegates. Downballot races tend to be anonymous; in Virginia, they were sometimes the biggest magnet for activists and donors.

Once Gillespie had conceded, the recriminations on the right began in earnest. Trump blamed Gillespie for not sufficiently embracing him. Virginia Republicans blamed the White House for…being the White House, basically:

Rep. SCOTT TAYLOR, Va. Beach Republican, calls election a repudiation of the White House: "I do believe that this is a referendum on this administration" Taylor faults Trump's "divisive rhetoric," calls on POTUS to engage in "self-reflection" — Alex Burns (@alexburnsNYT) November 8, 2017

The reality is they’re both right. Republicans, by embracing Trump, have hitched their fortunes to the president’s whether they regret it or not. Gillespie’s campaign was a reflection of this struggle. And Virginia may not be the last domino to fall.