“Sometimes you can actually create as much change with a really transformative loss,” Tom Perriello told the New Republic after conceding Virginia’s Democratic gubernatorial primary to Lt. Governor Ralph Northam. It was the kind of sentiment that losing candidates have trotted out since time immemorial, a positive gloss to assure your supporters (and perhaps yourself) that all the glad-handing and money-soliciting and speech-making had not been in vain. But Perriello, despite putting on a brave face as he hugged staff and volunteers, seemed to mean it. The insurgent populist had just delivered a gracious, rousing call for unity at a rally at the State Theatre in Falls Church, and was proud of how his late campaign had changed the trajectory of the governor’s race. “No one’s ever run anything close to this progressive in Virginia,” he said. “When I got in this race, nobody was talking about a $15-an-hour minimum wage or two years of free community college. Now that’s mainstreamed in the party.”

If Perriello had reasons to be happy, then so does the Democratic Party. A race that had often been characterized as a redux of the Hillary Clinton-Bernie Sanders 2016 presidential primary, with all the bitterness and enmity that implies, not only ended amicably, but with a general election candidate who genuinely improved over the course of the campaign thanks to his opponent. Meanwhile, the Republican primary between Ed Gillespie, a former Republican National Committee chair with deep ties to the party’s establishment, and Corey Stewart, a neo-Confederate carpetbagger who was so extreme that he was fired by the Donald Trump campaign, ended with a squeaker of a victory for Gillespie, showcasing the GOP’s ongoing struggles with an extremist cancer that is eating at the party from the inside.

Most importantly, the energy is very clearly on Northam’s side. Northam received nearly as many votes as were cast in the entire Republican primary, suggesting that Democrats have close to a two-to-one advantage with energized voters heading into the general election. And Stewart and Gillespie won’t be holding hands anytime soon. After it became clear he would lose the election, Stewart was defiant. “There is one word you will never hear from me, and that’s ‘unity,’” he told supporters. “We’ve been backing down too long. We’ve been backing down too long in defense of our culture and our heritage and our country.”

Perriello nationalized the race in ways that should send shudders down the spines of Republicans across the country.

Low turnout is not the GOP’s only problem. As the race tightened, Gillespie increasingly had to chain himself to Trump and appeal to Stewart’s supporters. Near the end of the campaign, he was running digital ads promising to fight for Virginia’s Confederate monuments. Gillespie will have to walk a fine line in the general election: In an increasingly blue state, he will have to embrace Trump to gin up support among his diehard supporters, while keeping Trump at arm’s length to appeal to, well, everyone else. And instead of facing an alleged Berniecrat (a description that has never quite fit for Perriello, whose closest ties are to the Barack Obama wing of the Democratic Party), he will run against a candidate, in Northam, with deep ties to the state, one who managed to win broad popular support while positioning himself as a fervent anti-Trumper.

For that, Northam can thank Perriello, who nationalized the race in ways that should send shudders down the spines of Republicans across the country. While the Virginia press was initially skeptical of Perriello’s constant hammering of Trump, Northam’s campaign eventually took up that mantle. His biggest moment of the campaign was when he referred to the president as a “narcissistic maniac.”