RICHMOND, Va. (WVEC) -- Lieutenant Governor Ralph Northam will become Virginia's next governor after beating out Republican opponent Ed Gillespie and Libertarian candidate Cliff Hyra Tuesday.

The Associated Press called the race for Northam at 8:12 p.m.

Gillespie later took the stage, surrounded by fellow Republicans, as he conceded the race.

“I am proud to stand on this stage with you both this evening,” Gillespie said to Jill Vogel and John Adams, Tuesday night.

All three Republican candidates searched for the words that might help their supporters come to terms with a Democratic sweep of the statewide races.

Gillespie preached unity in defeat.

“They love our fellow Virginians, and they love even those who disagree with them, and I know that they, too, are rooting for our new governor to succeed because we all love the Commonwealth of Virginia,” Gillespie said.

Gillespie added he wishes Northam success and told the governor-elect if he could help him make the Commonwealth better, he would do anything he could.

Virginia's hard-fought race was closely watched as a swing-state test of President Donald Trump's popularity. Northam, a pediatric neurologist and the state's lieutenant governor, repeatedly tried to tie Gillespie to the president during months of divisive campaigning overshadowed by racial overtones and attack ads.

The majority of Hampton Roads voted for Northam.

Northam's victory was in large part due to a surge in anti-Trump energy since the president took office. Democrats said they had record levels of enthusiasm heading into the race.

Gillespie kept Trump at a distance throughout the campaign but tried to rally the president's supporters with hard-edge ads focused on illegal immigration and preserving Confederate statues.