Although at times over the last week it seemed that Democrats were doing their damnedest to lose the Virginia gubernatorial race, they failed miserably in that endeavor, which is to say that they succeeded emphatically at the polls. Ralph Northam will be the state’s next governor.

That’s a gigantic relief, because a Northam defeat would have prompted a Democratic meltdown — and rightly so. In statewide races, Virginia is increasingly blue: Hillary Clinton beat Donald Trump there by five points a year ago. And Trump’s ceaseless assault on propriety, decency and ethical, responsible government is supposedly firing up liberals as never before. Virginia on Tuesday was the place to demonstrate that.

The demonstration was impressive. Not only did Northam beat his Republican opponent, Ed Gillespie, by about nine points — a margin of victory larger than either Clinton’s or the two-point advantage that ushered the state’s current Democratic governor, Terry McAuliffe, into office four years ago — but Democrats also performed strongly in other Virginia races. So strongly, in fact, that one Democrat, Danica Roem, easily unseated a longtime Republican incumbent in the House of Delegates and will become the nation’s only openly transgender state representative. The history that she made flies squarely in the face of the bigotry and divisiveness that Trump sows.

Just when we needed a sign that his America is not all of America, Virginia came to the rescue and gave us a vivid one. And I guarantee you that the Republicans up for re-election in 2018 saw it, shuddered and will spend the next weeks and months trying to figure out just how much trouble their party is in and precisely how to repair it. Democrats are exceedingly familiar with that feeling.