James A. Barnes is a member of the CNN Decision Desk and co-author of the forthcoming 2018 Almanac of American Politics.

(CNN) The dynamics of the 2016 presidential race continue to shape the nation's political terrain, and the latest evidence of that fact is this week's primary results for governor in Virginia. In both the Democratic and Republican races, an urban-rural divide defined the outcome of those contests.

While these races have a tendency to hinge on local issues, Virginia is a key battleground during presidential and midterm election years. It's the first such state primary in a battleground since 2016, when President Donald Trump lost Virginia and Hillary Clinton carried the state's major metropolitan areas and their suburbs, particularly those outside of Washington, DC and Richmond.

The Republicans

Ed Gillespie, the former lobbyist and Republican National Committee chairman, parlayed his establishment connections and a strong showing in an unsuccessful bid for the Senate in 2014 into a narrow 44%-43% GOP primary victory over Prince William County Board of Supervisors chairman Corey Stewart. Veteran GOP state Senator Frank Wagner of Virginia Beach finished a distant third with 14%, based on complete but unofficial returns. Gillespie owes his 4,300-vote statewide margin of victory to his strength in the close-in suburbs of Washington, DC, and Richmond, the state capital.

In Fairfax County, the largest vote-producer in the primary just outside of Washington, Gillespie defeated Stewart, 48%-39%. Along with his two-to-one advantage over Stewart in nearby Arlington and Alexandria, Gillespie garnered roughly 7,700 votes more than Stewart in these areas.

Read More