AN ACCIDENT of geography—that Virginia is hard by Washington, DC, albeit separated by the Potomac River—means that the federal government is a huge economic engine for the state. More than one in four dollars flowing through the state’s economy is linked to direct and indirect spending by the capital.

So when President Donald Trump suggested that he might favour a government shutdown next month to exact funding for his wall on the border with Mexico, Virginia politicians, particularly those running for governor this year, took notice.

Their concern—in the aftermath of the violence in Charlottesville that looms over the campaign—is electoral as well as economic. They know only too well the consequences of the federal government going dark.

There is little doubt that a federal shutdown would exacerbate voter hostility towards Mr Trump in a state that was comfortably carried last November by Hillary Clinton. And that would probably help the Democratic nominee for governor, Ralph Northam, who rarely misses an opportunity to link his Republican rival, Ed Gillespie, with the unpopular president.

Mr Gillespie tries not to speak about Mr Trump. To do so is perilous. The Republican nominee does not want to irritate voters loyal to the president. Nor does he want to raise the expectations of voters who would like to see him display show a modicum of independence from Mr Trump. But a shutdown would force him to explain why his party, now in control of the presidency and Congress, seems incapable of fulfilling on the most basic responsibility of government.

Publicly, Mr Gillespie’s campaign expresses confidence that Mr Trump and Congress will do their job, sparing the government from closing on September 30th, the last day of the spending year, and idling vast swaths of the federal work force. That could include 136,000 civilian workers in Virginia, second only to California in federal employment.

In 2013, when a Democratic White House and Republican Congress failed to agree on spending, the government closed for 16 days. Coming about a month before that year’s election for Virginia governor, the shutdown was an opportunity for the Democratic candidate, Terry McAuliffe, to play the guilt-by-association card against his Republican opponent, Ken Cuccinelli.

Mr McAuliffe did so with little effort. Mr Cuccinelli’s image as a brittle conservative ideologue was complemented by the public perception that truculent Republican majorities in the House and the Senate were largely responsible for the shutdown, refusing overtures from the Obama administration to compromise.

Though the botched rollout of the Affordable Care Act in late October would overshadow the shutdown and energise Republican voters, providing a late boost for Mr Cuccinelli, the governorship narrowly fell to Mr McAuliffe, who would spend most of his four-year term managing the fiscal aftershocks of the government shutdown.

The shutdown triggered then—as it could now—automatic, across-the-board spending cuts, or sequestration. That drained $10bn from Virginia's economy and eliminated 22,000 jobs. Many were high-paying, information-technology positions with government contractors in the state’s population hubs, the Northern Virginia suburbs of Washington and Hampton Roads, a defence centre on the Atlantic coast. When employment plunged, so, too, did tax collections by the state. About $1.5bn in revenue evaporated, forcing Mr McAuliffe and Virginia’s Republican-controlled legislature to cut spending, even for such prized services as education.

The protracted episode called attention to Virginia’s dependence on federal largess. When the state was heavily rural and firmly controlled by a debt-phobic, conservative Democratic oligarchy, it was an article of faith to decry as irresponsible the deficit-financing that has become routine in Washington, DC.

But in suburban-dominated Virginia, federal beneficence fuelled the growth of the counties immediately flanking Washington: Arlington, Fairfax, Prince William and Loudoun. As they became bustling, traffic-clogged, brimming with non-natives, and multihued—and the seat of the state’s service industry-dominated economy—they also became a vast trove of reliable Democratic votes. Hampton Roads, too, is becoming important source of Democratic votes

Even Northern Virginia’s few remaining Republican officeholders stoutly advocate for federal workers, openly challenging Mr Trump over his bureaucrat-bashing, including his short-lived freeze on government employment early in his term. Barbara Comstock, a Republican representative re-elected to a second term in 2016 despite the Clinton wave that swept the region, reflexively breaks with the president on government work force issues.

Mr Trump’s threat of a shutdown—he says Democrats could get their pet projects in return for his—strikes many in both parties as theatre, with a stop-gap scheme likely to finance the government, if only temporarily. That, however, could underscore the urgency of the issue that Mr Northam and Mr Gillespie spending little time discussing: ways to diversify Virginia’s economy and lessen its reliance on Washington, DC.

That has been a theme of Mr McAuliffe’s governorship, but it could take years to recalibrate the state’s economy. Virginia governors can only serve a single, non-renewable, four-year term, which means state government takes a new turn no sooner than it adjusts to an older one. It is easier to talk about diversification than actually do something about it.