In 1994, the governor of California, Pete Wilson, a Republican, was facing a difficult reëlection campaign, until he embraced a statewide referendum that proposed banning undocumented immigrants from using many state services. The initiative passed by a large margin—eighteen points—and Wilson was easily reëlected, with fifty-five per cent of the vote. California Republicans believed that they had found the electoral equivalent of a magic bullet. Instead, 1994 turned out to be the beginning of the end for the G.O.P. in the state.

Proposition 187, as the ballot measure was known, is often considered the most important event in modern California politics. It galvanized Latinos, who had been trending toward the Republican Party, and many non-Hispanic whites, to form a fiercely pro-Democratic political force. In the twenty-three years since Wilson’s triumph, Republicans have lost nearly every statewide race. (Arnold Schwarzenegger’s two successful campaigns for governor are the notable exceptions.) The G.O.P. barely exists in the state now. It holds no statewide offices and hasn’t sent a U.S. senator to Washington since 1992. Republicans make up just a quarter of California’s large House delegation and less than a third of the elected officials in the statehouse. The last Republican Presidential candidate to win the state was George H. W. Bush, in 1988. Several other factors helped turn California deeply blue, but Prop 187 is now widely seen as an enormous mistake by the G.O.P.

Tuesday’s election results, especially in Virginia, offered the first evidence of a potential backlash against the racial politics of Trumpism, a result akin to what happened in California. Virginia has been trending away from the Republican Party for a while now. Democrats have won three straight Presidential elections there and hold both Senate seats, but the G.O.P. has remained competitive. The last three Democrats to win statewide elections received less than fifty per cent of the vote. In 2013, Terry McAuliffe, the Democratic candidate for governor, outspent Ken Cuccinelli, his very conservative Republican opponent, by two to one, and won by less than three points.* On Tuesday, Ralph Northam, the Democratic candidate, won the governorship by a stunning nine points (fifty-four per cent to forty-five per cent).

“This is the Prop 187 effect,” Tom Perriello, a former congressman from Virginia who challenged Northam from the left in the Democratic primary but campaigned hard for him in the general election, told me. “California Republicans got one good election and lost the state forever. Trump is the Prop 187 of America.”

One election isn’t enough to know whether Trumpism has truly backfired on the G.O.P. in the same way that Prop 187 did in California. The process happened in stages in the Golden State. Republicans initially received a surge of support from white voters who embraced the anti-immigration policies. That was followed by an intense political mobilization of Latinos. As Republicans pushed forward with more anti-immigration proposals that, over time, became defined as discriminatory, white voters, especially those who were younger and more educated, fled the party. As one academic treatment of the process noted, “If the racial nature of a campaign message is made explicit, it will harm the messenger since blatantly racial appeals violate norms of racial equality. Few people want to be racist and the vast majority of people will not support a party if they believe it is playing the race card.”

The best evidence for a modern Prop 187 effect came from northern Virginia, the increasingly diverse area outside of Washington, D.C. On Tuesday, a region that has been a hotbed of anti-Trump activism delivered a massive Democratic backlash vote against the President, powered by a coalition of college-educated whites and racial and religious minorities. “Latino, Asian, and Muslim communities were all activated,” Perriello said. The impact could be seen down the ballot as well. In northern Virginia, six older white Republicans in the House of Delegates were swept out of office by a group of candidates that included a transgender woman, two Latinas, an African-American woman, and an Asian immigrant. These victors were part of a wave that, pending recounts, may hand the Virginia House to Democrats. The one white male candidate among the new Democratic winners in the region is a self-described Democratic Socialist (and, as some observers, commenting on the rainbow-like quality of the Democratic candidates, have wryly noted, a redhead).

In what will be a critical race in next year’s midterm elections, Alison Friedman, a single mother and first-time candidate, is one of the leading Democratic contenders to face the Virginia Representative Barbara Comstock, who will be perhaps the most vulnerable House Republican in the country. Friedman spent months campaigning and canvassing for many of the House of Delegates candidates who won on Tuesday. She told me that the sense of fear about Trump’s policies among minority communities was ever-present. Recently, she was knocking on doors with Wendy Gooditis, a candidate for the House of Delegates who went on to unseat a Republican incumbent.

“As we were knocking on doors on Monday, she talked about this ninety-year-old neighbor of hers wearing a Star of David,” Friedman said. “Her entire extended family died in the Holocaust, and she was just so scared. Over the course of the campaign, Wendy has gone back to check on that woman every two weeks.” That kind of fear, and other factors, drove high Democratic turnout on Tuesday in Virginia.

Perriello, like many Democrats, went into Election Night unsure of the results. He said that he was prepared for anything from a narrow Northam loss to a ten-point victory. He and many Democrats were terrified that the last of month of campaigning on racially tinged issues by the Republican gubernatorial candidate, Ed Gillespie, would succeed. In the wake of the rally in Charlottesville, where neo-Nazis and Klansmen marched to defend Confederate monuments, Gillespie condemned the racists but called for keeping the monuments up. In a state with a historically low rate of violent crime, he ran ads that prominently featured Hispanic gang members. He sent out a mailer with a picture of a football player kneeling, an allusion to the N.F.L. players who are protesting police brutality against African-Americans. “You’d never take a knee,” it said, “So take a stand on Election Day. Vote Ed Gillespie for Governor.” Instead, Virginia voters took a stand against Trump and the many Republicans who have been tainted by their association with him.

“To have won the way we did, with the candidates we did," Perriello said, when five days earlier, "we thought the most racist campaign we’ve ever seen,” might win, "was just amazing.” He noted that on Election Night the sense of relief was especially notable among the new activists Trump has energized on the left. “You could tell the difference between regular Democrats and the more movement people by the nature of their hugs,” he said. The new activists embraced one another “like, ‘holy shit, humanity may have just been saved.’ ”

*An earlier version of this post mischaracterized McAuliffe’s pre-gubernatorial career.