Republicans currently control twice as many governorships as the Democrats -- a 33 to 16 advantage, with one independent. Democrats are hoping they can start to chip away at that margin this November.

The fields are now set in both New Jersey and Virginia, the two states holding races for governor this year. Democrats have reason to be optimistic about their chances in both.

In Virginia, Lt. Gov. Ralph Northam won the party's nomination on Tuesday to succeed Democratic Gov. Terry McAuliffe, who is term-limited. Northam easily turned back a challenge from former Rep. Tom Perriello, who had enjoyed support from several former Obama administration officials. Northam outpaced Perriello in the state's urban centers and in heavily African-American precincts.

The surprise came on the Republican side. Ed Gillespie, a former national and state party chair who nearly unseated U.S. Sen. Mark Warner in 2014, had been the frontrunner all year. But he only narrowly defeated Corey Stewart, who chairs the Prince William County Board of Supervisors. Gillespie took 43.7 percent of the vote to Stewart's 42.6 percent. Gillespie's margin is just outside the 1 percent threshold that would trigger a runoff.

Democrats are holding a unity event on Wednesday, featuring Northam, Perriello and McAuliffe. On Tuesday night, by contrast, Stewart did not sound as if he were in a conciliatory mood. "There is one word you will never hear from me, and that's 'unity,'" Stewart told supporters.

Stewart, a one-time state chair for President Trump's campaign, struck a defiant tone throughout the campaign, vowing to crack down on illegal immigrants and defend Virginia's Confederate monuments.

Gillespie may seek to avoid taking such a hard line in a state that Hillary Clinton carried last fall -- the Democrats' third straight presidential victory in Virginia. In fact, he may avoid tying himself to Trump at all. Asked on Twitter if Gillespie should turn down campaign appearances with Trump, Larry Sabato, a University of Virginia political scientist, responded, "Only if he's sane."

In New Jersey, Democrats are also hoping Trump's unpopularity there will be a drag on Lt. Gov. Kim Guadagno, who won the GOP nomination. She is running to replace Chris Christie, who is term-limited and has the lowest approval rating of any governor in the country.  “When you’ve got Christie in the teens and Trump in the 30s, that just makes a very difficult path for Republicans,” says Jared Leopold, spokesman for the Democratic Governors Association.

For their part, Republicans are similarly trying to portray Democratic nominee Phil Murphy as guilty by association. Murphy made his fortune as a Goldman Sachs executive -- just like former Gov. Jon Corzine, who went on to oversee the collapse of a brokerage firm following his defeat by Christie in 2009. "Murphy can't hide the numerous similarities and connections between him and failed Gov. Jon Corzine," the Republican Governors Association stated in a news release last week.

"There's going to be a lot of that, comparisons with Trump and Christie on the one hand and Jon Corzine on the other," says John Weingart, a political scientist at Rutgers University.

Weingart predicts that Guadagno will have a tough tightrope to walk. She'll need to distance herself from Christie while also distinguishing herself from Murphy. "She's following two terms of a Republican governor, but she clearly doesn't want to say this is going to be Christie's third term," Weingart says.

A Quinnipiac University poll released Wednesday showed Murphy with a 55 to 26 percent advantage over Guadagno.

In both New Jersey and Virginia, primary turnout was far higher on the Democratic side than among GOP voters. Democrats are taking that as a sign their supporters are more enthusiastic.

The terrain starts out as favorable for Democrats in both states this year. They'll want to win both races to build momentum heading into 2018, when Republicans will be defending 26 of the 36 governorships at stake.

GOP dominance of the ranks of governors give Democrats plenty of chances. If Republicans win 50 percent of next year's races, they'll still lose eight seats, University of Minnesota political scientist Eric Ostermeier points out in a blog post.

History suggests that even a tie might be optimistic for the GOP. Ostermeier notes that the president's party has lost a majority of gubernatorial contests in eight of the last nine midterm elections, dating back to 1982, and in 17 of the 20 midterm elections all the way back to 1938.

*A pre-election version of this story appeared in the June issue of Governing.