Opinion writer

Ed Gillespie in Sterling, Va., on March 16. (Astrid Riecken for The Washington Post)

Virginia Govs. George Allen (1994-1998) and Jim Gilmore (1998-2002), both Republicans, were followed by two Democrats (now-Sens. Mark Warner and Tim Kaine), then by a Republican Bob McDonnell (2010-2014). At the presidential level, the state voted Republican from 1968 through 2004, but not once since then. In the Senate, beginning in the 1990s, Republicans and Democrats both served; since 2009, only Democrats have been elected.

Commentators still call Virginia a swing or “purple” state. Is that right? A state whose last Republican U.S. senator was elected in 2002, last GOP governor in 2009 and last Republican presidential candidate in 2004 seems rather blue. Virginia over the past few decades has transitioned from solid red to blue.

It’s not hard to see why. Populations in Northern Virginia counties, the suburbs and exurbs of Washington, have swamped the voter rolls. New professionals of all races, more minority voters and a slew of government workers have steadily nudged the state to the left in statewide races. Republicans have clung on to some U.S. House and state legislative seats because of downstate conservatives. A few tenacious moderate Republicans have held on to seats in the House and state legislature, but they’re a dying breed.

In statewide races, there are no longer enough conservatives outside those counties, however, to balance out huge margins rung up by Democrats in Northern Virginia, especially Fairfax County. The disparity in politics, culture and economics between deep-red, downstate Republican strongholds and blue Northern counties has grown. As long as Northern Virginia counties are part of the mix, Republicans are badly outnumbered.

Tuesday the gubernatorial nominees will be decided. Ed Gillespie, a former Republican National Committee chairman and adviser to President George W. Bush, has all but sewn up the GOP race. On issues such as immigration, however, he is no longer a Bush Republican. If you want to win over the GOP base in Virginia these days, you better not turn off President Trump’s fans. On the Democratic side, the more liberal Tom Perriello, an early endorser of Barack Obama, is in a dead heat against moderate Lt. Gov. Ralph Northam, who has the governor and both U.S. senators behind him.

A few years ago, one would have said Perriello didn’t have a chance in a statewide general elections. Democrats couldn’t run too far left for fear of generating a strong backlash in conservative strongholds and losing college-educated, professional white voters in Northern Virginia. Now, however, most any Democrat to the right of Sen. Bernie Sanders (I-Vt.) can rack up a huge lead in Northern Virginia counties and turn out the minority vote in the Richmond area. He’ll lose downstate, red counties, but it hardly matters these days given the margins he can accumulate elsewhere.

In short, Perriello has about as good a chance as Northam of beating Gillespie. If it’s a base election, Perriello might even have the edge. When the national GOP gets badly out of step with the biggest population centers in Northern Virginia, most any competent Democratic candidate should be able to win.

Nevertheless, the one candidate who came closest to a statewide victory since 2009 was none other than Gillespie. Facing off against Warner in 2014, Gillespie ran a disciplined campaign on a handful of centrist, bread-and-butter issues. He ran against Washington, D.C. gridlock (something he will be hard-pressed to do with the GOP in control of the Congress and White House) and promised more jobs, a better business climate and energy development. Gillespie came within a whisker of beating Warner in a year the GOP picked up nine Senate seats.

Wednesday morning, Gillespie will wake up with a political dilemma. He’ll face off against a united Democratic Party. (Neither Democrat ran a negative race against the other.) Does he return to his Bush 43 roots, hoping to peel off some Northern Virginia moderates, or go hard right, trying to gin up as much turnout downstate to balance Democratic margins in Northern counties? Does he run in defense of the Trump agenda — which would be political suicide among Northern Virginia moderates — or away from Trump, which would turn off the base? He’ll try to do neither, running on strictly state issues. That’s not as easy as it sounds. He’ll be pressed to take a stand on health care (especially Medicaid), the GOP budget and immigration. He’ll be asked to denounce Trump’s rhetoric and ethical pig sty. Voters will want to know if Gillespie favors a tax plan heavily tilted toward the rich, as is Trump’s.

Whoever the Democratic nominee may be, look for him to make the race a referendum on Trump and an appeal to cordial, productive bipartisanship (unlike Trumpian vitriol). A Democrat running on a message that Virginia shouldn’t become like Trump’s America will win over Democrats, independents and a slice of Republicans. Turning the voters’ attention away from Washington and raising the specter of tax hikes and runaway spending will be Gillespie’s best chance. He’ll nevertheless have to explain how he is going to make his tax cuts work in a state where demand has grown for spending on schools and transportation.

If Gillespie does win in November, he’ll provide a model for other Republicans seeking to escape the shadow of Trump. If the Democrats win, look for another wave of anxiety to roll through GOP ranks.