Smyth County, Va., where the unemployment rate was 5 percent in August, higher than the statewide average of 3.8 percent. (Michael S. Williamson/The Washington Post)

Republican Ed Gillespie and Democratic Lt. Gov. Ralph Northam opened the final debate of the governor’s race by clashing on a single topic: Virginia’s economy.

It may seem odd that the economy is a matter of debate in a state where the unemployment rate has fallen to 3.7 percent, among the lowest in the country and below the national rate of 4.2 percent. And almost 7 in 10 Virginia voters said the economy in their home region is either "excellent" or "good" in a recent Washington Post-Schar School poll.

But that same poll showed that the economy and health care are the issues likely voters are most concerned about this year. And only 44 percent said the state is headed in the right direction, the least-positive assessment in more than two decades of Post polls.

Gillespie regularly hammers Virginia’s economy, painting a picture of a state that sounds like it’s about to collapse — slow-growing, losing residents, with policies that “take us in the wrong direction.”

Even Northam, who defends the legacy of Terry McAuliffe (D), the current governor and his chief patron, has said that “it’s time to get the paddles out and shock rural Virginia back to life.”

Virginia’s uneven recovery mirrors its growing political divide

The truth is that the top-line numbers for Virginia don’t paint the full picture. A state that had seemed immune to typical cycles of boom and bust has been vulnerable since the financial crisis of nearly a decade ago. Government work, long the prop for Virginia’s economy, is no longer reliable in an era of shaky congressional budget deals, sequestration and slimmer defense spending.

Even worse, the demise of legacy industries — coal mining, tobacco, textiles, furniture-making — has left regions of the state facing a generations-long challenge to rebuild. And because of changes in technology affecting companies all over the country, new employers don’t bring as many jobs or pay as well as the old industries.

“People are working, but at the end of the day their paycheck doesn’t feel larger compared to what they were. The sense of many voters is that they are essentially working harder to stand still,” said Robert McNab, an economist at Old Dominion University in Norfolk.

That dynamic also helps explain how politically disparate Virginia has become. The urban areas that are doing well — especially Northern Virginia and Richmond — are increasingly blue, tilting toward Democrats in statewide and national elections.

But suffering rural areas are not only red; they also went dramatically for Donald Trump last year, in part because he spoke to their economic desperation. Voters in coal country know they’ll never see the thousands of jobs of decades past, but Trump’s vow to loosen coal regulations offered at least a shred of relief.

The latest stories and details on the 2017 Virginia general election and race for governor.

“Republicans have tended to say ‘coal, coal, coal’ . . . and Democrats have just shied away,” said Jack Kennedy, the longtime clerk of court for Wise County, in the southwest corner of the state.

Kennedy, a former Democratic state senator, helped bring the final gubernatorial debate to Wise, hoping to highlight the region’s plight — and simply to get some publicity for his isolated area. The challenges facing Wise, where the unemployment rate is 7 percent, are a good example of how difficult it’s going to be to fix parts of Virginia’s economy.

As the coal industry withered, driven by global changes in energy preferences and competition from cheap natural gas, jobs fled Wise County. More than 1,000 former miners have probably left in just the past three years, said Carl Snodgrass, the county’s economic development director.

Revenue from a coal tax imposed on mining companies has plummeted because there simply aren’t many companies anymore. The tax brought in about $14 million a year, more than one-fifth of Wise’s annual budget, but it’s now down to less than $2 million yearly and falling, said David Cox, the county’s finance administrator.

Increasing taxes to replace that revenue is not a good option. Local officials “don’t want to raise taxes on people who don’t have a job or are struggling to hang on,” Cox said.

The county has raced to attract new employers, to retrain its workers, to get modern skills for young people — before so many leave that no company wants to locate there. It’s an expensive proposition. Enrollment at the University of Virginia’s College at Wise, which has a modern, attractive campus, is stuck at about 2,200. Local officials say it needs to more than double in size to bring in a critical mass of talent and research programs that could lead to job creation. That would require a sizable investment from the state.

There has been some success in wooing new business. Last year, the McAuliffe administration announced that a $70 million data center would locate near Wise’s Lonesome Pine Airport. It opened this summer, a sprawling facility behind an imposing metal fence. But it employs fewer than 40 people.

And while the county is hoping to attract more data centers to a vast vacant tract nearby, it’s handicapped by a limited electricity grid and a lack of access to renewable energy, Kennedy said.

Those kinds of complications are why McAuliffe’s vigorous crusade to lure new business to Virginia during his term has had mixed results. He — and Northam — routinely tout the statistic that they’ve created more than 200,000 new jobs in the past four years. Even Republicans praise the governor for his salesmanship; conservative radio host John Fredericks told McAuliffe on his show last week that “nobody’s been a better salesman for Virginia or worked harder than you have.”

But the new jobs don’t pay as well as the old ones did, and they’re not enough to counter the loss of major traditional industries or the softness in government work for large contractors.

Since the financial crisis began in 2007, Virginia has had an unusually difficult time making up lost ground. After earlier recessions, going back to 1981, the state returned to pre-recession employment levels in less than three years. This time, it took nearly five years, and the climb since has been slow, according to an analysis by the Commonwealth Institute for Fiscal Analysis, a Richmond-based think tank.

The recovery has been wildly inconsistent around the state. Many metropolitan areas have done fine — Northern Virginia, Charlottesville and Richmond are all at least 6 percent above pre-recession employment levels, the institute found. Harrisonburg and Blacksburg are also up.

But Roanoke and Hampton Roads continue to struggle, with almost no net job growth in the past decade. Lynchburg and rural parts of the state have never recovered lost jobs, according to the analysis.

Hampton Roads is particularly vexing, because some of the forces dragging it down are beyond state control. Flat federal contracting and military spending shackle the region’s economy.

Because it relies on big defense contractors, the region has been especially slow to develop a culture of small, entrepreneurial start-ups — the kinds of companies that usually drive job growth, said ODU’s McNab.

Breaking that cycle is more difficult because Hampton Roads is so fragmented: seven independent cities in a state that gives little power to local governments.

One of the few tools that localities in Virginia have to raise revenue from businesses — or create incentives for them — is the business/professional/occupational license tax. Both Northam and Gillespie propose sharply limiting or eliminating those taxes, something that every recent candidate for governor has also proposed, McNab said.

But local governments lobby against those changes because they need that small measure of local control, McNab said.

Fixing these long-term problems will be costly and complicated for whoever wins in November, but slow growth is having a worrisome effect on Virginia's finances. The state's general-fund revenue is increasing much more slowly than historical rates, thanks to decreased tax revenue. Lawmakers have had to plug holes in the budget over the past few years, tapping into the state's "rainy day" reserves to help fund things such as pay raises for law enforcement.

That, in turn, has caused Standard & Poor's to put a negative outlook on the state's cherished AAA bond rating. This budgetary tightness is why Richmond insiders are skeptical of any political promises of big spending, and some have cringed at both candidates' calls for tax cuts.

Northam has proposed rolling back grocery taxes for low-income residents, while Gillespie has championed a far more ambitious 10 percent across-the-board cut to state income tax.

Gillespie insists that the state’s natural growth would make that cut affordable, but he said he’d delay implementation if revenue didn’t reach certain targets.

“The state does not have the resources to make the kind of investment you might expect to address some of these challenges,” said Michael Cassidy, president of the Commonwealth Institute for Fiscal Analysis. “The challenge for state lawmakers is to have a clear-eyed view of what it is they can do.”

Emily Guskin and Laura Vozzella contributed to this report.