Democrats have just won what is likely the most important election in 2017 — and gotten a positive signal about their possible electoral fortunes in the Trump era.

Lt. Gov. Ralph Northam, a Democrat, defeated Republican Ed Gillespie Tuesday, with the election called around 8:15 pm by CNN and MSNBC.

The result offers a potentially optimistic sign for national Democrats hoping to rebuild their party from the rubble — and returning comfort to believing the polls, which showed Northam consistently ahead on average. Democrats have traditionally struggled to motivate their supporters to vote in non-presidential elections, and Northam’s victory suggests that the liberal base may be more eager to turn out for down-ballot races with Donald Trump in the White House than it had been with Barack Obama in office.

Perhaps just as importantly, Democrats’ victory suggests that Gillespie’s campaign strategy has its limits. Gillespie, a former lobbyist and Republican National Committee chair, turned heads in Washington by leaning heavily on Trump’s playbook — running deeply misleading culture war ads alleging Northam was soft on the Salvadoran gang MS-13. Democrats worried the race baiting might pay off in a low-turnout election, but it wasn’t enough to put him over the top in the purple state.

Of course, this is just one election, and it’s probably safest not to read too much into its national implications. Gov. Terry McAuliffe won the state in 2013, it has two Democratic senators, and Democrats have controlled the state’s governor’s mansion for 11 of the past 15 years.

But after blowing the first four special elections since Trump’s victory, Democrats have been searching desperately for an election to feel good about. They just got one.

Democrats had a candidate with a strong resume in a blue state

Beyond trying to read national trends, the facts of the race suggested to political observers that Northam would be a stronger candidate — especially when evaluating the candidates’ backstories.

Northam has all the credentials center-left party operatives tend to extol in a candidate. He’s a doctor. He served in the military. He has a moderate voting record — though he’s come out for progressive policies like debt-free college and a $15 minimum wage — and he takes to the campaign trail with a Southern accent and small-town, genteel affect.

Gillespie is a consummate establishment insider; his résumé looks like a textbook on climbing the GOP institutional ladder — press secretary for John Kasich; Republican lobbyist on Capitol Hill with ties to oil companies and Enron; chair of the Republican National Committee; White House counsel to George W. Bush; chair of Republican State Leadership Committee; losing Senate candidate (in 2014, Gillespie came within 1 point of winning a Senate race against Warner).

Gillespie tried to find an opening by flaying Northam over culture war issues in mailers and campaign ads. As Vox’s Matt Yglesias wrote, Gillespie’s ads would vaguely gesture to some unknown connection between Northam and the gang MS-13 by listing the gang’s atrocities and then Northam’s name, “thus attempting to create a link between a brutal criminal organization and an Army doctor turned pediatric neurosurgeon.”

But the ads apparently were not enough — which may not be too surprising in a state that Trump lost. Northam tried to turn the campaign back to pocketbook economic issues and health care. Tightening baseline polls suggested he appeared to be struggling to craft a message that appeals to the party's base. But 28 percent of Virginia voters reported that the economy was their most important issue, and 26 percent said health care was — good signs for Northam.

In the Obama era, Democrats lost 62 House seats, 11 Senate seats, 12 governorships, and 958 state legislature seats. Winning Virginia’s governor’s mansion suggests that trend may be about to reverse itself.