Democrat Ralph Northam beat Republican Ed Gillespie in the Virginia governor's race by almost nine points. He outperformed his predecessor, Terry McAuliffe, as well as Hillary Clinton, pushing Virginia toward a reliable blue.

The victory came in a familiar way for Democrats: a surge of support in urban areas around Richmond and Hampton Roads and a giant Northern Virginia margin of 260,000 votes, double McAuliffe's win in the District of Columbia suburbs four years ago.

Gillespie may have won more than twice as many counties as Northam, and Republicans increased somewhat their winning margins across a broad western and southern swath of rural and small-town Virginia. But there was little sign of the Donald Trump surge that swept across GOP strongholds just a year ago and raised Republican hopes statewide.

High division, high turnout

Comparing Election Day precinct results with 2013 shows how neighborhoods shifted the governor's race in different directions in Virginia's largest urban centers compared with other areas. Democrats bettered their showing by 12 percentage points or more in about 30 percent of the state's precincts. Republicans did so in about 20 percent of precincts.

The Trump effect

Both Northam and Gillespie significantly built up their party's neighborhood strongholds, much the way that Trump and Clinton did last year.

Where Trump performed far better than Mitt Romney, Gillespie grew the Republican margin by almost eight percentage points compared to the 2013 governor's race. Northam beat his predecessor by more than 10 points in similar areas. Tuesday exit polls suggest Trump was likely a factor in both. More than 1 in 3 voters said they voted to show opposition to the president, while almost 1 in 5 say they did it in support.

A racial divide

A key component of the surge for Democrats were voters in minority neighborhoods, where Northam won three-quarters of the votes overall and more than 80 percent in African-American neighborhoods. Margins grew by 10 points in Hispanic neighborhoods.

In predominantly white neighborhoods, the large political divide remained about the same, with Democrats and Republicans dividing up the votes that went to third-party candidates back in 2013.

Widening polarization by education

Neighborhoods where most adults have a college degree showed one of this election's largest shifts. Northam increased the Democratic win to 63 percent, up by almost 10 points. Gillespie gained five points in neighborhoods where most adults stopped their education at high school.

According to statewide exit polls, Clinton lost the white college-educated demographic in Virginia by four points last year, while Northam won it by three.

What does all this mean for 2018?(Photo: Ted Mellnik and Kevin Schaul, The Washington Post)

What does this all mean for 2018?

Tuesday's signs of growing enthusiasm among Democrats in the Trump era could herald challenges next year for Republicans in swing areas. In Virginia's 10th Congressional District, for example, Republican Barbara Comstock won another term but Clinton finished ahead of Trump. On Tuesday, seven Republican incumbents in the state legislature with districts touching Comstock's were defeated by Democrats. Precincts in the 10th District gave Northam a win of more than 55 percent on Election Day, significantly more than four years ago, and built upon the same political trends seen in precincts statewide.

The Washington Post's Kevin Uhrmacher and Chiqui Esteban contributed to this report.

About this story: Data from Virginia Board of Elections and U.S. Census Bureau.