Voters head to the polls on Tuesday in Virginia to pick the state’s next governor in a close race between Democratic candidate Ralph Northam and Republican Ed Gillespie.

Virginia should be favorable territory for Democrats. The current governor, Terry McAuliffe, is a Democrat. Hillary Clinton won the state in the last presidential election. And only 41 percent of likely voters approve of President Trump in the state, according to a Monmouth University poll published on Monday. Yet the race has become a nail-biter. Northam only has a narrow lead in polling averages and Gillespie has gained ground over the past month.  

If Democrats lose, it will chip away at the party’s already diminished grip on state politics and exacerbate in-fighting between progressives and moderates over the best way to win races. It could also spell trouble for the party’s chances of success in the 2018 midterm elections.

“It would be a very big blow if Democrats can’t win in Virginia,” said Brad Bannon, a Democratic strategist. “We haven’t had a good track record of winning elections lately, and if we can’t win in Virginia where Trump’s job rating is pretty poor that raises the question: Can we win back a whole bunch of House seats next year?”

Northam and Gillespie are both establishment figures who have tried, somewhat awkwardly, to find their way in a political environment upended by the 2016 election.

Gillespie is a former Republican National Committee chairman, who has nevertheless taken a page out of the Trump playbook by casting himself as a law-and-order candidate and attacking his opponent over the issue of sanctuary cities, as well as vowing to preserve Confederate monuments. But Gillespie rarely invokes Trump’s name, apparently making a gamble that he can imitate some of the president’s stances without cozying up to him directly. Trump, for his part, has been tweeting his support of Gillespie and urged voters to support the Republican candidate on Tuesday.

Northam is also inescapably a part of the political establishment as the current Democratic lieutenant governor. During the primary campaign, he channeled the anger felt by many Democratic voters toward Trump by calling him a “narcissistic maniac,” only to vow during the general election that if Trump is “helping Virginia,” he will work with him.

If Gillespie wins the race, the outcome is likely to encourage Republican candidates running in future races to adopt Trump-style rhetoric, even in states that aren’t deep red.

“Gillespie has run a campaign that seems to have worked, or at least put him in a position where he could win ... This is evidence of the further Trump-ification of the Republican Party,” said Geoffrey Skelley of the University of Virginia Center for Politics. “The approach that Trump took is one that other Republicans are going to model themselves off of.”

Whatever happens in Virginia, Democrats are expected to notch at least one victory on Tuesday. Democrat Phil Murphy has a comfortable lead in polling over Republican Kim Guadagno in the New Jersey governor’s race to replace Republican Chris Christie.

Still, that won’t be much consolation for a party that has suffered a string of high-profile defeats after losing the White House in 2016. So far, Democratic candidates have lost to Republicans in 2017 special-election congressional races in Kansas, Georgia, Montana, and South Carolina.

A loss in Virginia would not be as easy for the party to explain away as earlier defeats this year in special elections. In Kansas, Georgia, Montana, and South Carolina, Democrats lost, but they were running in conservative districts and battling it out for seats that had been under Republican control.

Not only are Democrats shut out of power in Washington, the party’s power has also severely eroded at the state level, losing hundreds of state-legislature seats while former President Obama was in office. When West Virginia Governor Jim Justice flipped parties from Democrat to Republican in August, the switch brought the number of Republican governorships up to 34 in the United States, and marked a record low for Democrats in their party’s control of governors’ mansions.

The outcome of the Virginia governor’s race could also have far-reaching consequences when the state redraws congressional district maps after the 2020 Census. The Virginia governor has the authority to veto any redistricting plan passed by the state legislature, which is currently under Republican control.  

“[Tuesday’s] election may determine whether Democrats have a seat at the table in 2021 when maps are redrawn or if Republicans will hold all the cards,” said Michael Li, a senior counsel for the Brennan Center’s Democracy Program.

As Gillespie has chipped away at Northam’s lead, reports of Democratic anxiety have surfaced. “Close Virginia governor polls set Democratic nerves on edge,” a Politico headline read earlier this month. According to the RealClearPolitics polling average for the race, Northam currently leads by 3.3 percentage points.  

The Virginia governor’s race has highlighted the still lingering, and powerful, rift within the Democratic Party over whether progressive candidates can win everywhere in the country, or if Democrats in purple or red states need to adopt stances that might appeal to more conservative voters.

Democracy for America, a progressive advocacy organization, denounced Northam’s campaign after the Virginia Democratic candidate expressed opposition to sanctuary cities, calling the statement “gutless, politically senseless, and morally debased.” That, in turn, drew a rebuke from the organization’s founder, former Democratic National Committee Chairman Howard Dean, who said on Twitter that the statement “discredits” the group.

If Northam loses, there will be more second-guessing among Democrats over strategy, and more divisiveness. If Democrats pull out a win, that outcome may tamp down on some of the public disputes over strategy and positions within the party.

The lesson Republicans take from the race may be the same whether Gillespie wins or loses, at least if the loss is by only a narrow margin.

“There’s no one-size-fits plan for any candidate, but there is what you’ll call a general outline for how you go after this thing if the headwinds are against you, and that is to fire up conservative base voters, and to do that by turning to cultural issues,” said Ford O’Connell, a Republican strategist who has worked on campaigns in Virginia. “Northam has a lot of the advantages, but Gillespie seems to have the momentum.”