Democratic candidate for governor, Lt. Gov. Ralph Northam, left, shakes hands with Republican challenger Ed Gillespie after a debate at the University of Virginia-Wise in Wise, Va., Monday, Oct. 9, 2017. (Steve Helber/AP)

Virginia’s two major-party candidates for governor went after each other in their third and final debate before the Nov. 7 election but never focused on the one name that has hung over the race from the start: Donald Trump.

Democrat Ralph Northam and Republican Ed Gillespie kept a civil tone but clashed over themes of economic progress for rural Virginia in a debate held Monday night in the state’s ailing coal country.

Northam, who during the campaign has repeatedly tried to tie Gillespie to an unpopular President Trump, uttered the name only in passing this time as he instead took every opportunity to paint his opponent as a creature of Washington and K Street.

“He believes in giving tax cuts to the wealthy at the expense of the working class,” said Northam, Virginia’s lieutenant governor.

For his part, Gillespie hammered on Virginia’s economy, painting a picture of a struggling state whose slow growth is belied by its low, 3.8 percent unemployment rate.

“The fact is, our economic growth has been stuck for six straight years now,” Gillespie said.

Speaking at the Wise campus of the University of Virginia, a plush oasis in an otherwise struggling part of the state, the two candidates returned to themes of opportunity for rural areas.

This has not been a high-
profile theme so far in the race, as the populous suburbs of Northern Virginia and the areas around Richmond and Hampton Roads make up more and more of the electorate and draw an outsize portion of campaign time.

Gillespie was playing to a friendly crowd of more than 550 in the cavernous gymnasium, as many attendees in this solidly red county wore Gillespie shirts or stickers.

While Virginia as a whole was the only Southern state to go for Hillary Clinton last year, this part of the state went heavily for Trump — largely because of the issue of coal.

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

Even on a question about education, Gillespie bent his answer toward jobs and coal. “We are not going to increase jobs in southwest Virginia by doing what the lieutenant governor wants to do, which is to impose an Obama-style Clean Power Plan on Virginia,” he said. “That will only result in more laid-off miners.”

As the candidates sparred over the economy, it sounded as if they were talking about two different states.

Northam took credit for 215,000 new jobs that he said had been created during the term of Gov. Terry McAuliffe (D), who is prohibited by the state constitution from serving a second consecutive term. Northam touted the unemployment rate’s drop from a high of 5.4 percent and noted that the state has expanded transportation funding and access to high-speed Internet.

Gillespie described a Virginia young people are fleeing because of a lack of opportunity and said Northam would raise taxes and make electricity bills go up.

Gillespie touted his plan for an across-the-board 10 percent tax cut as a way to renew growth, and he cast Northam as a liberal big spender.

“He doesn’t oppose tax cuts because they’re tax cuts for the rich, he opposes them because they’re tax cuts,” the Republican said.

Northam countered by citing an analysis saying that Gillespie’s plan would reduce state revenue by $1.4 billion a year when fully enacted and asked how his opponent would pay for his promises for better teacher pay and better roads without that funding.

That was one of several instances where the candidates directly confronted one another with a little more vinegar than in the past two debates.

On a question about partisan gerrymandering, for instance, Northam said he wants a nonpartisan commission to draw political boundaries.

“My opponent,” he added, “is actually the architect of gerrymandering throughout this country.”

He was referring to Gillespie’s time as chairman of the Republican State Leadership Committee, when he helped engineer redistricting that resulted in Republican takeovers of statehouses around the country.

 Gillespie shot back that Northam voted for a Democratic-drawn map when he served in the legislature.

He tried to deflect Northam’s accusations with a joke: “In my history books, it was Eldridge Gerry who came up with gerrymandering,” he said.

When each man was given the opportunity to query his opponent, both pitched off-kilter questions as a way of trying to underscore what they perceive as their strengths.

Gillespie asked Northam a question about McAuliffe’s decision to cancel a meeting with the sheriffs’ association as a way to present himself as a champion of law enforcement.

Northam, a physician, asked Gillespie a question about federally funded, long-acting reversible contraception to reinforce his posture as a supporter of women’s reproductive rights.

Northam also tried to pin Gillespie down on whether he would support universal background checks for firearms purchases in the wake of the mass shooting in Las Vegas and other recent gun violence.

“As you know, there are universal background checks,” Gillespie said, noting that state police are at all gun shows.

A 2016 gun deal struck between the Republican-controlled General Assembly and McAuliffe made provisions for background checks at all gun shows, but the checks remain voluntary if the sellers are not licensed dealers.

Northam played up their very different résumés, even using his military service to beat back Gillespie’s criticism that Northam was a no-show at various meetings of state boards on which he had formal membership as lieutenant governor.

“I served for eight years in the U.S. Army. I showed up for this country . . . You’ve been a K Street lobbyist in Washington. The only time you show up is when you get paid,” Northam said.

As a candidate often criticized for his mild tone, that qualified as a zinger for Northam.

Gillespie didn’t flinch. “I did show up for my clients . . . and I was effective,” he said.

In the end, the two wrapped up the debate on a more polite tone, thanking each other — and their wives — for running this year.

The candidates are not scheduled to meet again before the election.

Most public polls released in the past few weeks show Northam and Gillespie neck and neck or Northam with a slight lead.

Laura Vozzella contributed to this report.

An earlier version of this story incorrectly said Gillespie worked to engineer redistricting across the country as chair of the Republican National Committee. He was chair of the Republican State Leadership Committee at the time. This story has been updated.