Mr. Gillespie had the backing of all the state's high-profile Republicans and had a major cash advantage.
Gillespie fended off an unexpectedly strong challenge from Corey Stewart, chairman of the Prince William Board of County Supervisors. With about 99 percent of precincts reporting Tuesday, more than 536,000 people had voted in the Democratic primary. Wagner, a longtime state senator from Virginia Beach, has positioned himself as the pro-business, common sense conservative in the race who's interested in getting the economy moving above all else.
Even though he held on to a lead that dwindled in the closing days, Mr. Gillespie enters the general election wounded, having failed to crack 50 percent in a race he was expected to dominate.
Former U.S. Rep. Tom Perriello, who served from 2008 to 2010, is running as a liberal crusader supported by Sen. The other state choosing a new chief executive is New Jersey, more often than not a solidly Democratic state. Northam hopes to continue the work he started with McAuliffe and is focusing his campaign on economic progress.
Interestingly, though, neither Northam nor Perriello is as true-blue Democrat as the campaign might have led voters to believe.
He and his supporters claimed a moral victory in the loss, saying they forced Mr. Northam to run to the left.
Democrats will need to avoid going far left in order to benefit from GOP defections. "I'm shocked. If Donald Trump didn't carry the state of Virginia, I don't know how Corey is going to", Nancy Russell, former Hanover County chairwoman said.
Northam said he'd do everything he could to reach out to Perriello backers.
Trump's job approval rating drops to 36% - Western Mass News - WGGB/WSHM
Just 16 percent said they have a "very favorable" opinion of the president, compared with 20 percent in March . Fifty-seven percent now disapprove.
In total, there was a 70 percent increase in Democratic voter turnout from the last gubernatorial primary that took place in 2009. Stewart, with his prominent connections to the campaign, ran as a vocal Trump backer.
Lieutenant governor is a part-time, largely ceremonial job that involves presiding over the state Senate and breaking tied votes.
The victor on the Democrat side, Ralph Northam, notes that as lieutenant governor, he cast tie-breaking votes to ban employment discrimination based on sexual orientation in state government; to repeal the "infamous and medically unnecessary" mandate requiring an ultrasound before abortion; and to raise the minimum wage for all working Virginians.
State Sen. Jill Holtzman Vogel of Fauquier County won a narrow victory over state Sen. A Vogel victory would also end Virginia's more than two-decade streak without a woman in statewide elected office.
"You had to ask if he was running for the president of the Confederacy or governor of Virginia", declared George Mason University political science professor Mark Rozell.
"I would like to congratulate Ed Gillespie on securing the Republican nomination and moving one step closer towards becoming Virginia's next governor", said RNC Chairwoman Ronna McDaniel in an official statement.
"I think he has the ability to move Virginia forward like McAuliffe has", the 80-year-old said.
The three-way Republican primary remains too close to call.
That lack of enthusiasm may have affected turnout. "Republicans want to claim that the Trump movement is doing well and the Democrats want to claim it is not". But there is a catch: You can only vote in one primary, either the Democratic primary or the Republican primary. So was almost every Democratic member of the state's House delegation and statehouse and local-elected officials.