Virginia Gov.-elect Ralph Northam celebrates at George Mason University in Fairfax, Va., on Nov. 7, 2017. (Photo: Cliff Owen/AP)

ARLINGTON, Va. — Democratic voters in Virginia left no doubt Tuesday night: They are highly motivated to rebuke President Trump.

Lt. Gov. Ralph Northam’s overwhelming victory in the gubernatorial election put to rest the idea that anti-Trump energy would be wasted in the type of race where Democrats traditionally don’t show up in significant numbers.

Northam, a Democrat and the state’s lieutenant governor, handily defeated Republican Ed Gillespie by nearly nine percentage points, outpacing polls that showed him with a slimmer lead heading into the contest.

In his victory speech before a jubilant crowd at George Mason University in the northern Virginia suburbs of Washington, D.C., Northam referenced the bitterly fought campaign.

“Virginia has told us to end the divisiveness, that we will not condone hatred and bigotry, and to end the politics that have torn this country apart,” Northam said.

A pediatric neurologist, Northam told the crowd, “It’s going to take a doctor to heal our differences.”

“I’m here to let you know that the doctor is in, and this doctor will be on call for the next four years,” he added.

Northam was briefly interrupted by protesters who appeared to target his recent statement that he would sign a bill banning sanctuary cities if any Virginia locality refused to comply with federal immigration law. “Virginia wants sanctuary for all!” the protesters chanted, and Northam was taken off the stage for a few moments while they were escorted from the room.

Still, it was a big night in the state for Democrats, who were on track to take an astonishing number of seats in the Virginia House of Delegates, and possibly wrest majority control of that chamber from Republicans.

“This is a tidal wave,” said Dave Wasserman, editor of the Cook Political Report.

Trump, who had inserted himself into the race by urging his supporters to vote for Gillespie, was left to try to explain the defeat.

“Ed Gillespie worked hard, but did not embrace me or what I stand for,” Trump tweeted from South Korea. “Don’t forget, Republicans won 4 out of 4 House seats, and with the economy doing record numbers, we will continue to win, even bigger than before!”

Story continues

Yet if the race portends a national trend, Republicans are facing a very tough midterm election cycle next year. Gillespie got more votes than the Republican candidate did four years ago, but Democratic turnout for Northam swamped their numbers from 2013. Nowhere was the increase in turnout more pronounced than northern Virginia.

Republican gubernatorial candidate Ed Gillespie at an election night rally on Nov. 7, 2017, in Richmond, Va. (Photo: Mark Wilson/Getty Images)

Northam received more than 220,000 votes in Fairfax County, up from the roughly 176,000 current Democratic Gov. Terry McAuliffe received there in the last election. Overall in northern Virginia, Northam got around 440,000 votes, compared to roughly 347,000 who cast a ballot for McAuliffe in 2013.

Gillespie actually got fewer votes in northern Virginia than the 2013 Republican, drawing about 210,000 votes, compared to 224,000 northern Virginia votes four years ago.

That showing in a part of the state where Trump is highly unpopular was the clearest indication that voters want to repudiate Trump.

Northam, who served in the Army and graduated from the Virginia Military Institute, also won in areas such as Virginia Beach, a region with a heavy military presence where McAuliffe lost in 2013.

Northam aides said that while the national media talked a lot about Gillespie’s negative ads, they yielded limited positive returns for the Republican. An ad about Confederate monuments drove Gillespie’s numbers up in the Roanoke area, but didn’t work in northern Virginia or Richmond, said Northam spokesman David Turner.

The results will serve as a cautionary tale for Republicans about the limits of racially charged dog-whistle politics in swing states, even though that type of campaign obviously served to motivate the GOP base in Virginia. It will send Republican consultants who might have run carbon copies of Gillespie’s campaign back to the drawing board to find a winning strategy for next fall’s elections.

Northam was bloodied by Gillespie’s ruthless attacks, but it appears that embracing Trump’s brand of bare-knuckle politics did not serve Gillespie well.

“Virginia sent a strong message that Trump-style division — pitting people against people — is not the Virginia way. It is not the American way,” said Sen. Tim Kaine, D-Va. Kaine is being challenged by Corey Stewart in next year’s elections.

Gillespie told disappointed supporters in Richmond that he wished Northam “nothing but the best success.” He briefly grew emotional while thanking his wife for her support.

Virginia has become increasingly Democratic over the last few decades, especially as the population has grown larger and more diverse.

But Democrats worried about a structural challenge they face in nonpresidential election years. Key components of their base — minorities and younger voters — do not have a history of turning out to vote in high numbers in off-year contests.

However, Northam’s victory also demonstrates that figures like Stewart, easily dismissed as irrelevant just a few years ago before the rise of Trump, can no longer be ignored. Kaine, who is one of many Democrats discussed as a potential presidential candidate in 2020, will have to be on his game to avoid an upset loss to Stewart.

Democrats had worried that Northam’s campaign was collapsing in the closing days and weeks, under the strain of an energized and unified Republican base. In mid-September, Gillespie began launching a fusillade of ads attacking Northam on racially charged issues such as sanctuary cities, Confederate monuments and protests by NFL players.

Read more from Yahoo News: