The looming battle for the Democratic nomination for Virginia governor could offer a window into Democratic voters’ mood in the era of President Trump.

While Democrats have looked to recent special elections to gauge shifts in GOP-leaning districts, Virginia’s primary will test whether progressives aligned with Sen. Bernie Sanders Bernie SandersKenosha will be a good bellwether in 2020 Biden's fiscal program: What is the likely market impact? McConnell accuses Democrats of sowing division by 'downplaying progress' on election security MORE (I-Vt.) are gaining traction against the party’s establishment after wide-ranging Democratic defeats in 2016.

ADVERTISEMENT

Lt. Gov. Ralph Northam was expected to cruise to the Democratic nomination on June 13, thanks to a long history in state politics and endorsements from party heavyweights such as Gov. Terry McAuliffe (D), who is limited to only one term as governor.

But former Rep. Tom Perriello has used progressive appeals and strident anti-Trump attacks to upend the race.

“[Perriello] probably entered the race as a credible underdog, but I think that over the course of the past few months, I have a hard time saying that there’s a favorite,” said Kyle Kondik, managing editor of Sabato’s Crystal Ball, an election analysis site at the University of Virginia.

“The primary still feels like a jump ball on the Democratic side. There’s a lot of uncertainty about what the size of the turnout is going to be.”

Virginia Democrats are aligned on the majority of issues. The difference comes in their style and messaging.

Perriello, who served only one term in Congress, from 2008 to 2010, has been buoyed in the gubernatorial race by his fierce anti-Trump rhetoric. Perriello has defended his attempts to run a race on national issues, arguing that the issues related to Trump’s agenda are at the core of Virginia voters’ priorities.

The former congressman’s platform mirrors Sanders’s economic populism, with Perriello backing free tuition at community colleges, a $15 minimum wage and tax increases on the wealthy.

Sanders backed Perriello in one of his first post-election endorsements, following through on the endorsement with a campaign stop at George Mason University. Perriello has also earned an endorsement from Sen. Elizabeth Warren Elizabeth WarrenBiden's fiscal program: What is the likely market impact? Warren, Schumer introduce plan for next president to cancel ,000 in student debt The Hill's 12:30 Report - Presented by Facebook - Don't expect a government check anytime soon MORE (D-Mass.), another senator favored by the left.

Despite Perriello’s national endorsements, though, Northam has racked up the overwhelming majority of local support. While Perriello rails against Trump, Northam’s message is rooted in his long ties to state politics.

Northam has touted relationships with lawmakers in the state capitol that he built during his time as lieutenant governor and, before that, as a state senator. Even though he has taken a more local approach, Northam has still been critical of Trump on the campaign trail.

The differences between Perriello’s and Northam’s campaigns underscore the struggle within the Democratic Party, as well as Sanders’s influence in Democratic races.

Since November, Sanders has been a major player helping top Democratic National Committee leaders unify a party divided after his presidential primary fight with Hillary Clinton Hillary Diane Rodham ClintonWhat Senate Republicans have said about election-year Supreme Court vacancies Bipartisan praise pours in after Ginsburg's death Trump carries on with rally, unaware of Ginsburg's death MORE. So far, though, Sanders’s candidates have fared poorly in some of the most closely watched races of 2017.

Sanders-endorsed candidates running in special elections in Kansas and Montana both fell short — though they both proved more competitive against Republicans in their districts than previous

Democratic candidates.

Sanders’s allies have been challenged within the party as well. In the liberal bastion of California, Sanders-tied candidates failed to make gains in both a congressional special election and the fight over who would lead the state’s Democratic Party.

Virginia’s gubernatorial primary could show the appeal of Sanders and his politics within the party — or it could show that Democratic voters in a state that only recently turned blue prefer to stick with the establishment’s candidate.

“Perriello seems to have a lot of national Democratic support. Northam has basically a monopoly on state-level Virginia Democratic support,” Kondik said. “Which one’s more valuable? We’ll see.”

Polls reflect a tight race, with some showing Perriello with a slight edge. But strategists say the Democratic primary is essentially a toss-up.

Both candidates have seized on their opponent’s past records with attacks that reflect the race’s leftward tilt.

Northam has taken heat for voting for former President George W. Bush twice, while Perriello has been scrutinized for earning a National Rifle Association endorsement in 2010 and supporting an ObamaCare amendment that prohibited participating insurance providers from covering abortions.

Both Virginia Democrats have since expressed regret for their past stances.

Regardless of who wins the Democratic nod, the party has an inherent advantage in November’s election. Clinton won Virginia by a larger margin than former President Barack Obama Barack Hussein ObamaObama calls on Senate not to fill Ginsburg's vacancy until after election Senate Republicans face tough decision on replacing Ginsburg Cruz: Trump should nominate a Supreme Court justice next week MORE.

The party out of power in the White House has won the Virginia governor’s mansion in every election since 1977, with the exception of McAuliffe’s 2013 win.

“The Virginia governor’s race has proven over time to be a better indicator for the direction of a national environment than any other election,” said Jesse Ferguson, a Virginia Democratic strategist who isn’t supporting either candidate in the primary.

Ed Gillespie, a former Republican National Committee chairman and former Senate candidate, is strongly favored in the GOP primary.

He faces Corey Stewart, former co-chairman of Trump’s Virginia campaign and chairman of Prince William County’s Board of Supervisors, and state Sen. Frank Wagner.

Even Republicans concede that the momentum is on the Democratic side, thanks to the current political environment and strong anti-Trump headwinds that will likely create a formidable political climate for the GOP.

“The Democratic base will be out in disproportionate numbers,” said Tom Davis, a former GOP congressman who currently serves as a government affairs director at Deloitte. “Because angry people vote in off-years and they want to send a message to Trump.”

Recent polls show both Northam and Perriello easily defeating Gillespie in general election matchups. A mid-May survey from Washington Post–Schar School in George Mason University found both Virginia Democrats defeating Gillespie by double-digit margins.

Still, Davis said the GOP nominee shouldn’t be written off before seeing how the eventual pick campaigns. And Gillespie has experience running in tough races after coming unexpectedly close to pulling off an upset against Sen. Mark Warner Mark Robert WarnerIntelligence chief says Congress will get some in-person election security briefings Overnight Defense: Trump hosts Israel, UAE, Bahrain for historic signing l Air Force reveals it secretly built and flew new fighter jet l Coronavirus creates delay in Pentagon research for alternative to 'forever chemicals' House approves bill to secure internet-connected federal devices against cyber threats MORE (D-Va.) in 2014.

The general election is expected to come down to turnout and how Trump factors into Virginians’ voting habits.

Strategists say to keep an eye on whether independents and Republicans who didn’t vote for Trump in 2016 now gravitate to Gillespie — or even vote at all in November.

Other lingering questions are whether swing voters abandon Trump in droves and how many people are motivated to register as first-time voters.

“If either of those are true,” Ferguson said, “it will be a good indicator for Democrats’ prospects in 2018.”