What a difference a year makes.

On the eve of the anniversary of Donald Trump’s surprise victory in the 2016 presidential election, Democrats in Virginia, New Jersey, and elsewhere notched a surprisingly robust round of victories Tuesday night in elections that have been widely interpreted as a referendum on the Trump presidency and a potential augur of the 2018 elections.

The results in Virginia, where the prospects of gubernatorial candidate Ralph Northam gave Democrats severe heartburn over the last week, were particularly surprising: Not only did Northam coast to victory over Ed Gillespie, a Republican who had embraced the Trump message if not the president himself, but Democrats won legislative races across the Old Dominion, putting control of the House of Delegates—not generally expected to be up for grabs—within Democratic grasp. Bob Marshall, a particularly outspoken anti-LGBT conservative, was defeated by Danica Roem, who becomes the first openly transgender legislator in state and U.S. history.

But other results also confirmed the trend. In New Jersey, Democrat Phil Murphy won as expected over Lieutenant Governor Kim Guadagno, a Republican who was dragged down by deeply unpopular incumbent Chris Christie. In Charlotte, North Carolina, Democrat Vi Lyles cruised to victory over Republican Kenny Smith. In Maine, a referendum on expanding Medicaid under the Affordable Care Act, against the governor’s wishes, was headed for a lopsided victory. In Georgia, Democrats won two special elections for legislative seats, adding to a trend of strong special-election performances. The wave of Democratic victories comes a year late for the party, but late is better than never.

Of course, 2017’s races should always have favored Democrats. The party of a newly elected president tends to do poorly in the next cycle, and Trump’s historically terrible approval rating slanted the board away from Republicans. Virginia has increasingly trended toward Democrats in recent years, voting for Barack Obama twice and Hillary Clinton a year ago, while Christie’s unpopularity handed Murphy an easy path. But Democrats have tended to struggle to get voters to the polls in years without presidential ballots, and in the closing weeks of the campaign, momentum appeared to be shifting toward the GOP, especially in Virginia. Polls showed the gubernatorial race tightening, or perhaps even shifting in Gillespie’s favor. The enthusiasm gap, Democrats’ great weakness in 2016, seemed to be preparing for an encore performance in 2017. The bedwetters were, once again, ascendant.

One reason for the panic was that Democrats did not bring an especially charismatic candidate to the Virginia gubernatorial race, the night’s bellwether race. Northam looked strong on paper—he is a doctor, veteran, and sitting lieutenant governor—but was widely acknowledged to be a less-than-inspiring campaigner. Northam, who had beaten more progressive rival Tom Perriello in the Democratic primary, voted for George W. Bush for president (twice) and, as the polls tightened, tacked right, even voicing support for a ban on sanctuary cities. In a time when Democrats often seem to find creative ways to trip over their own feet, Northam’s late, desperate lunge to the right looked like the latest installment in the trend. A racially charged pro-Northam ad from an independent group, briefly used in the last days of the race, was quickly pulled, delivering what seemed to be both an indicator of Democratic panic and a potential boost to Republicans.

On the other side of the aisle, meanwhile, Ed Gillespie seemed to be running a surprisingly smart race. Gillespie, who lost an unexpectedly narrow race to Democratic Senator Mark Warner in 2014, had very narrowly won the GOP primary, beating Corey Stewart, a candidate in the Trump image who campaigned on anti-immigration and pro-Confederate-heritage sentiments and won alt-right support. An establishment Republican who made his name as RNC chair, adviser to George W. Bush, and a successful Washington lobbyist, Gillespie seemed perhaps less suited to taking up the Trump mantle than any other GOP candidate in the country.

Yet Gillespie took to the task with gusto, trying to cut a path that appealed to Trump-friendly voters while keeping the president himself at arm’s length, the better to appeal to moderate Republicans in Northern Virginia’s increasingly pivotal Washington suburbs and exurbs. In the aftermath of violent white-supremacist demonstrations in Charlottesville in August, Gillespie, reared in New Jersey, adopted the defense of Confederate monuments and a hardline on immigration as central campaign planks. Gillespie opted not to have Trump campaign for him in person—making him the first president since Watergate-era Richard Nixon not to stump in the Virginia governor’s race—but Vice President Pence did visit, and Trump boosted Gillespie via Twitter.

If Gillespie’s fusion succeeded, Republicans figured, it would offer a powerful model of how Trumpist politics could meld with the establishment GOP to win even in Democrat-leaning purple states. Steve Bannon, the former Trump campaign CEO and White House chief strategist, boasted in the election’s final days that Gillespie’s strategy showed the way forward for a GOP in the post-2016 era.

“He’s closed an enthusiasm gap by rallying around the Trump agenda,” Bannon told The New York Times. “And I think the big lesson for Tuesday is that, in Gillespie’s case, Trumpism without Trump can show the way forward. If that’s the case, Democrats better be very, very worried.”

But what if that wasn’t the case? What lesson should Democrats take, and what should Republicans conclude? As the results streamed in and favored Northam, President Trump, weighing in from Asia, tweeted, “Ed Gillespie worked hard but did not embrace me or what I stand for.” The problem for Republicans is that while Gillespie did not embrace the president personally, he went out of his way, and broke with his longstanding political profile, to embrace what Trump stood for, and lost anyway. But Gillespie might have fared even worse had he embraced Trump the man, eroding his support among Trump-skeptical traditional Republicans, especially in Northern Virginia. Trumpism proved to be an unexpectedly powerful current in the 2016 race, and it triumphed in this year’s Alabama GOP primary for U.S. Senate, where a Trumpist candidate won—defeating a Trump-endorsed candidate. But so far, its ability to win more broadly, especially in swing states like Virginia, remains unproven.

There’s no victory or set of victories that could heal the damage done to the Democratic Party and progressive causes by Trump’s election. But the range of victories, from Virginia to New Jersey and elsewhere, offer evidence that the disorder of Trump’s presidency and his rotten approval rating actually can translate into Democratic wins. The elections come the same week that a Washington Post-ABC News poll found Democrats hold the widest edge on the generic congressional ballot in a more than decade. None of this can directly foretell the results of the 2018 election, but it gives despondent Democrats a rare glimmer of hope—and will create new worries for Republicans of the pro- and anti-Trump varieties alike.