Tom Perriello, left, shakes hands with Ralph Northam. (Sarah L. Voisin/The Washington Post)

VIRGINIA’S GUBERNATORIAL primaries have attracted national attention as one of just two such statewide contests this year (the other being New Jersey’s). The more interesting of the Old Dominion’s two contests next Tuesday is on the Democratic side, which looks like a neck-and-neck race between Tom Perriello, a former one-term congressman, and Ralph Northam, the sitting lieutenant governor. Both are competent, accomplished and astute; Mr. Northam would make the better governor.

In the Republican race, the most sensible and, by a country mile, the most principled of the three candidates is state Sen. Frank Wagner, who also happens to be an underdog lagging in money and, outside his Virginia Beach district, name recognition.

First, the Democrats. The Northam-Perriello matchup, seen through a national prism, is often cast as a proxy contest for the party’s soul between the establishment Forces of Hillary and the populist Forces of Bernie. That’s a nice talking point for politicos; for most Virginians, it’s facile and irrelevant. So is the fact that the rhetorical fusillades regularly directed at President Trump by Mr. Perriello are more lethal than those of Mr. Northam — although the latter lately called the president a “narcissistic maniac.”

The fact is, the policy differences between the two, though real, are not enormous, and their contempt for the president is beside the point. Our preference for Mr. Northam, a pediatric neurologist, is based more on his experience, temperament and, especially, his chances of success in the face of likely Republican control of one or both houses of the state legislature for the foreseeable future.

His aw-shucks country-doctor affect notwithstanding, Mr. Northam is a shrewd politician whose decade in office — six years as a state senator, and now as lieutenant governor — has made him highly regarded in Richmond, including among Republican lawmakers, who tried to recruit him to switch parties in 2009. If any Democratic governor can nudge GOP majorities in his direction, it’s Mr. Northam. That matters in a state where governors, barred from running for consecutive terms, have one brief shot at getting things done.

(Dalton Bennett/The Washington Post)

Mr. Perriello, while accomplished and intellectually agile — he has done admirable work in the nonprofit sector and as an international envoy in the Obama administration in addition to his stint in Congress — is less likely to make a dent. Notwithstanding his cogent take on corporate consolidation and industrial automation, his soak-the-rich tax plan, which would finance two years of debt-free community college and other programs, is a non-starter in a centrist state.

As for the Republicans, the choice for us is simpler. Mr. Wagner is in some ways a GOP version of Mr. Northam — down-to-earth, substantive, principled and well-versed in policy and the ways of Richmond. By contrast, the putative front-runner, Ed Gillespie, a former Republican national chair and George W. Bush White House veteran who has dodged debates, is more opportunistic, proposing a pie-in-the-sky tax cut that disintegrates upon contact with reality. As for the third candidate, Prince William Board of County Supervisors Chairman Corey A. Stewart, his candidacy has been a romp through the fetid fields of intolerance and Confederacy nostalgia.