Democrat Ralph Northam was projected to win Virginia's race for governor Tuesday over Republican Ed Gillespie, as Democrats appeared headed for a big night across the board in races for lieutenant governor, attorney general and several key seats in the House of Delegates, based on exit polls and early returns.
Virginia's election has been closely watched nationwide as a test of President Donald Trump's status and impact on the tenor of politics in every state.
From Korea, Trump wasted no time lashing out at Gillespie. "Ed Gillespie worked hard but did not embrace me or what I stand for" the president tweeted before the final tally was in.
If those results held, it could signal a big win for Democrats in Virginia. In another closely watched race, in Prince William County, Democrat Danica Roem became the first openly transgender person to win a seat in Virginia's House of Delegates. She beat longtime Republican incumbent Robert Marshall by a wide margin. At least four other Republican incumbents lost their seats.
That was part of a wave of apparent victories for Democratic candidates, including what looked like a sweep of statewide offices. Democrat Justin Fairfax appeared headed to win as lieutenant governor over Republican Jill Holtzman Vogel, and incumbent Attorney General Mark Herring was headed for re-election over Republican challenger John Adams.
The race had been close in pre-election polling, and Northam had been criticized by some in his own party for waging a low-key campaign in a time of high passion and sharp rhetoric. But Virginians turned out in large numbers on a day of patchy rain around the state as Northam and the Democrats relied on an increasingly efficient system for getting voters to the polls, especially in the more populous parts of the state.
Northam's victory was propelled by white, college-educated women, voters who were concerned about health care, a strong showing among Democrats and voters who strongly disapprove of Trump, exit polls showed.
Though overall returns were incomplete, Northam's strength showed in a few bellwether counties.
With 95 of 96 precincts reporting in the District of Columbia suburb of Loudoun County, Northam had a nearly 20-point advantage. In 2013, Democrat Terry McAuliffe won Loudoun by only about 4 points on his way to a narrow win for governor.
Similarly, the key Richmond suburb of Chesterfield County, which had long been a Republican stronghold, was showing a 1-point edge for Gillespie with 75 of 76 precincts reporting. In 2013, Republican Ken Cuccinelli took the county by nearly 8 points in his losing bid against McAuliffe.
Recent statewide polls had shown the race for governor to be neck and neck, but the outcome hinged on two unpredictable factors: turnout, and Donald Trump.
While Democrats were energized to show some force after last fall's demoralizing loss by Hillary Clinton, Republicans were itching to deliver a knockout punch by snatching Virginia away. It was the only Southern state that went for Clinton last year.
Preliminary exit polling Tuesday showed Northam winning roughly 8 in 10 nonwhite voters, which is on par with Hillary Clinton's performance in Virginia last fall and with current Gov. Terry McAuliffe's in 2013. Clinton beat Trump in Virginia by 5 points.
The exit polling also showed Northam winning roughly 7 in 10 voters in the District's suburbs, including the populous exurbs of Loudoun and Prince William counties. That's a slightly higher edge than Clinton won there last year. Northam also had a roughly 20-point advantage in his home turf of Hampton Roads.
In the mountainous and western parts of the state, 7 in 10 voters supported Gillespie in the preliminary exit polling - but there are far fewer people in those regions.
The race was closer in central parts of the state as well as areas from the southern border up to Richmond.
Northam was counting on high turnout in Virginia's populous, diverse urban areas, particularly among African-American voters. Gillespie fought hard to eat into the growing Democratic base in Northern Virginia, as well as to motivate the largely rural, white voters who had supported Donald Trump in last fall's presidential race.
It was a tricky needle for Gillespie to thread. He had resisted even talking about the president for much of the race, while Northam called Trump a "narcissistic maniac" and pledged to be a bulwark against his policies in Virginia.
But Gillespie made a late pivot toward Trumpian tactics that seemed to energize his campaign, promising to defend Confederate heritage and airing ads that raised the specter of violence from illegal immigrants.
Trump, who never campaigned in Virginia for Gillespie, tweeted about the race several times Tuesday morning.
"Ralph Northam will allow crime to be rampant in Virginia," Trump wrote on Twitter. If the Republican wins, Trump said, "MS-13 and crime will be gone." He was referring to the MS-13 street gang that has featured prominently in Gillespie ads raising fears of violence and illegal immigration.
Those ads seemed to take a pivotal place in the race, appealing to some as an honest take on very real fears in suburban neighborhoods and condemned by others as Willie Horton-style race-baiting.
"I didn't think any of the ads in any of the races were good. It was a race to the bottom," said Morgan Broman, who is retired and accompanied his 18-year-old son as he voted for the first time at the Mt. Vernon Recreation Center in Alexandria. "Ralph Northam is not a member of MS-13 as far as I know." Broman voted for the Democratic ticket.
But at Beville Middle School in Woodbridge, Republican voter Barbara Cottman said she worried that Gillespie didn't go far enough with a law-and-order message. "I believe in... America first," said Cottman, 73. "The constitution, the constitution, the constitution. Without that we're gone. That´s our foundation."
The Trump factor has driven an unusual amount of national attention toward Virginia, where the election is one of only two statewide contests in the country. The other election, in New Jersey, isn't considered competitive, so Virginia has become the proxy for the painful effort by both major parties to find their way forward in the age of Trump.
Fully half of the more than $50 million raised by Virginia's statewide candidates came from outside interest groups, according to an analysis by the nonpartisan Virginia Public Access Project.
Trump is deeply unpopular in Virginia. Preliminary exit polling Tuesday showed just over 4 in 10 Virginia voters approving of Trump's performance, slightly higher than in some pre-election polls.
The top issue for Virginians in exit polling was healthcare, with just over 4 in 10 naming it as the most important issue in deciding their vote.
Roughly 1 in 7 named taxes as their deciding issue, the same number as identified gun policy or immigration.
Gillespie has campaigned on cutting taxes in Virginia and opposition to "sanctuary cities" that do not cooperate with federal deportation orders. Northam, a doctor, has campaigned on healthcare.
Northam appeared to get a boost from the man he is trying to succeed - McAuliffe, who is prohibited by the state constitution from serving a second, consecutive term.
In preliminary exit polling, a slight majority of voters approved of McAuliffe, with just over 4 in 10 disapproving of his job performance.
Democrats pulled out all the stops to try to boost turnout in the final weeks of the campaign, especially in a bid to woo African American voters to the polls. President Obama appeared at a rally in Richmond in late October, and recorded a robo-call that went out Tuesday to voters in urban parts of the state.
Northam's campaign reported that the Democratic field army had knocked on 1 million doors since Saturday.
Voter Georgia Jones, 68, a surgical technician from the Richmond area, said she voted for the Democratic slate out of a sense of tradition and obligation.
"Too many people suffered for us to get to this point for people not to vote," said Jones, who is African-American. Politicians need to know that "it's not about you. Do something for the people for a change."