For years, I have been writing and speaking about the country’s changing demographics and how that will affect the two parties. The GOP’s long-term prospects were not good, I argued, as a new wave of tolerant voters who valued diversity over tradition appeared poised to change the electorate’s make-up and our politics.

The 2016 elections seemed to prove me wrong, with Trump’s nationalist, culturally conservative message energizing whites, older voters and rural America. But last night’s results, particularly in Virginia, suggest that that demographic evolution is still underway. And those voters produced a Democratic wave that ought to scare GOP campaign strategists.

Younger voters showed that they can be drawn to the polls.

Four years ago, voters age 18-29 constituted 13 percent of the electorate. This year, they were 14 percent of all voters. More importantly, while Democrat Terry McAuliffe carried the group in 2013 by five points (45%-40%), this time those 18-29-year-olds went for Democrat Ralph Northam by 35 points (67%-32%). Greater turnout among voters age 25-29 and 30-39 – and bigger majorities for Northam among those categories – are part of the reason for the huge Democratic win.

White voters constituted a mere 67% of the electorate yesterday in Virginia, a dramatic drop from four years earlier, when whites were 72% of all voters. Yesterday’s white percentage matched the number from last year, when Hillary Clinton carried the state by five points over Donald Trump.

Republican Ed Gillespie drew 57% of whites, a point better than Ken Cuccinelli (R) did in 2013 and two points worse than Trump did last year. That small change, combined with the change in the racial make-up of the electorate and Northam’s 80% support among non-whites, was decisive.

A stunning 41% of yesterday’s voters identified as Democrats. Four years earlier the number was 37% and last year, when Clinton carried the state, only 40% identified as Democrats. Not surprisingly, a Democratic electorate voted more heavily Democratic.

Obviously, much of the Democratic wave showed up in the larger suburban counties, which include many swing voters.

In the D.C. suburbs, Northam won Loudoun County by 20 points and Fairfax County by over 36 points. Four years earlier, McAuliffe carried Loudoun by just over 4 points and Fairfax by 22 points. And the turnout in both counties was massive this time.

The same thing happened in the Richmond area. Northam won Henrico County by 23 points, while McAuliffe won it by 13. Four years ago, Cuccinelli carried Chesterfield County by 8 points, but this year the county was a virtual dead heat.

While all that was happening, Trump’s core supporters stayed loyal to Gillespie.

Trump won 80% of white born-again Christians last year, and Gillespie won 79% of them this time. Gillespie also did well with white men and white women without a college degree – a core Trump group.

Rural Virginia stuck with the Republican. Gillespie rolled up huge percentages in places like Tazewell County (83%), in southwest Virginia, and Smyth County (78%), in south-central Virginia, winning them by bigger margins than Cuccinelli did four years earlier. But those rural counties are not growing and have small populations.

Unexpected Democratic gains down the ballot had a wave-like quality. Democrats won two other statewide offices and more than a dozen seats in the House of Delegates. No wonder most observers are looking at the result as, at least in part, a referendum on the president.

Two days ago, there was uncertainty about Democratic turnout. Northam isn’t the most charismatic politician around, and he defeated a more progressive Democrat for his party’s nomination for governor — raising questions about whether supporters of Bernie Sanders would go to the polls for Northam. Clearly, they did.

Virginia is only one state, and while there is additional anecdotal evidence that Tuesday was an anti-Trump day, there is still a year until the midterms. Things could change – for better or for worse for the president and his party. But it is very possible that yesterday’s results gave us evidence that a midterm partisan wave is building. And that will have an impact on members of Congress, the president and the two parties starting today.