SINCE the 1976 presidential election Virginia’s gubernatorial politics have been guided by the “Virginia curse”: the party that wins the White House loses the governor’s mansion the following year. The pattern is regarded as a bellwether of shifting national tastes. Only once has it been disturbed. In 2013, Terry McAuliffe, a Democrat, was elected governor while Barack Obama was president. This was partly because of defections by Republicans offended by their nominee’s rigid conservatism.

This time round, given the deep distaste for Donald Trump, Democrats in Virginia want to believe the governorship is theirs for the taking on November 7th. But it will not be so simple. While public opinion polls have mostly shown Ralph Northam (pictured right), a Democrat, leading Ed Gillespie (pictured left), his Republican rival, the increasingly nasty campaign in Virginia—a state that twice fell to Mr Obama and last year tipped to Hillary Clinton—could ultimately be decided by turnout.

This is because voter participation, which exceeds 70% in presidential years, falls to around 40% in governor elections. The lower turnout magnifies the strength of the most reliable vote: older, white, male, conservative, heavily rural. In a word: Republican.

Spooked by the unexpected victory of Mr Trump last year, some Democrats worry that enmity for him won’t translate into a surge of votes for Mr Northam, who reflexively links Mr Gillespie to the unpopular president. At 33%, Mr Trump’s approval rating in Virginia roughly tracks his similarly underwhelming national scores.

That should make it easy for Mr Northam to play the guilt-by-association card against Mr Gillespie. The Republican refuses to say whether he would publicly appear with Mr Trump should he travel to Virginia to affirm his endorsement of Mr Gillespie, initially made in early October, via Twitter.

The president, who restated his support for Mr Gillespie in tweets last week that depicted the nominee as tough on immigration and strong on the economy, is more than a distraction in the Virginia campaign. Some of his policies have had an immediate and measurable effect on this Southern state. Its location, across the Potomac River from Washington, DC, means that national, state and local politics often elide.

Mr Trump’s travel ban, first introduced in January, rippled through—and riled—the heavily Democratic, vote-rich Northern Virginia suburbs, home to large numbers of Asians, who now account for roughly 6% of the state’s population. There was similar outrage in the region, a bedroom community for federal workers, when Mr Trump briefly froze government hiring and, months later, endorsed a possible shutdown of the bureaucracy to squeeze Democrats into supporting funding for his immigrant-blocking wall on the border with Mexico.

For Mr Gillespie, an establishment Republican in the Bush mold, all this is reason to run from Mr Trump, even while his campaign, with its nativist-toned ads, has been influenced by him. In interviews, Mr Gillespie has been known to bristle when asked about the president and his impact on the contest with Mr Northam.

Indeed, he has tried hard to change the subject. Barely two weeks before the election, he briefly succeeded with a provocative television commercial criticising Mr Northam for a supporting Mr McAuliffe’s court-blocked rights-restoration initiative that, Republicans said, might have allowed pedophiles to vote, sit on juries and perhaps own guns. For several days, the campaign focused on law and order.

But Mr Northam, with an incendiary advert of his own, managed to turn the conversation back to Mr Trump. Democrats circulated a mailer linking Mr Gillespie to Mr Trump and racially tinged violence in Charlottesville in early August in which a woman was killed. The incident, which called global attention to America’s eroding political dialogue, had prompted the president to defend the white supremacists who had descended on the university town to protest the possible removal of a statue of Confederate general, Robert E. Lee.

The candidates’ competing stances on Confederate memorials say a lot about their respective paths to the governorship. Mr Gillespie wants the statuary preserved, perhaps supplemented with signage explaining that the likenesses of Southern generals and political leaders are symbols of white supremacy. His position is intended to appease two audiences essential to his chances: rural, Trump-friendly voters for whom Virginia’s Confederate past is an article of faith and Trump-hostile suburbanites who welcome a fuller assessment of the state’s history, warts and all.

Mr Northam, in contrast, vows to use the full weight of the governorship to bring down the statues, which he says are pernicious, especially for black people, an essential Democratic voter bloc that, in the post-Obama era, isn’t turning out the numbers it once did.

But it is the long shadow of Mr. Trump that is largely driving the campaign. Anger over him is pushing votes to Mr Northam. That Mr Gillespie refuses to fully embrace the president contributes to Trump loyalists’ ambivalence toward his candidacy. This year, the curse that could ensure Mr Northam’s election may be the Trump curse.