Washington(CNN) Rep. Scott Taylor, R-Virginia, told CNN's "New Day" that Tuesday night's Democratic win in his state was a referendum on President Donald Trump, criticizing what he said was the President's rhetoric for hurting the party.

"I think last night was a referendum. I don't think there was any way you could look at it a different way, to be honest with you, and be intellectually consistent," he said Wednesday morning.

Democrat Ralph Northam defeated Republican Ed Gillespie in the Virginia gubernatorial race by 9 points in what was expected to be a close race.

Taylor, who made a similar point Tuesday night, added that "some of the very divisive rhetoric really prompted and helped usher in a really high Democratic turnout in Virginia."

Trump endorsed Gillespie in the race but distanced himself from the defeated candidate Tuesday night, saying the gubernatorial hopeful "worked hard but did not embrace me or what I stand for."

But Taylor told "New Day" that the President's rhetoric was part of the reason for the GOP's loss in the swing state.

"(T)here was an overwhelming thing that was looming large, that was, I think, the divisive rhetoric," he said.

Virginia's gubernatorial contest was the first major test of Democrats' ability to rebound after Trump's victory. The fundamentals of the state were in their favor: Under Democratic Gov. Terry McAuliffe, unemployment is lower than the national average, and voters have generally told pollsters that they see the commonwealth as on the right track while the nation is on the wrong track.

Gillespie distanced himself from Trump personally, but he embraced much of the President's agenda, including a focus on illegal immigration and sanctuary cities. Gillespie also echoed Trump's calls to keep Confederate monuments in place and criticized NFL players kneeling during the national anthem.