A new poll shows Democratic Lt. Gov. Ralph Northam with a slight edge over Republican Ed Gillespie in the Virginia governor’s race.

Democrats up and down the ticket in this fall’s elections have narrow leads over Republicans, according to the poll released Tuesday by the L. Douglas Wilder School of Government and Public Affairs at Virginia Commonwealth University.

Among likely voters, 42 percent favor Northam while 37 percent favor Gillespie, according to the poll. An additional 6 percent say they support libertarian candidate Cliff Hyra, while 13 percent are undecided, the university said.

But the survey has a margin of error of five percentage points for each candidate’s support among likely voters, so Northam’s overall lead is statistically insignificant.

Two weeks ago, a Monmouth University poll found Virginia voters evenly split on Northam and Gillespie, at 44 percent each.

The VCU poll’s findings show a stark distinction among voter preferences in different regions of the state. Registered voters in heavily populated Northern Virginia give a big advantage to Northam, who has 54 percent to Gillespie’s 25 percent. But Gillespie boasts a similar edge in the rural west, with 47 percent support compared with Northam’s 21 percent.

Other parts of the state are more closely divided. Northam is slightly stronger among voters in the south-central part of Virginia, leading by eight points. But he has only a four-point edge in his native Tidewater area, according to the poll. The northwestern part of the state tilts toward Gillespie by three points.

“I think people are really waiting to see the policy positions and where the candidates are on the issues that are really important to them,” said Robyn Diehl McDougle, public policy outreach director for the Wilder School. She said the relatively large percentage of undecided voters shows that the race could stay tight into the fall.

The poll shows Northam with a big lead among racial and ethnic minority registered voters, with 61 percent support to only 15 percent for Gillespie. Northam has nearly twice Gillespie’s support among voters with a college degree: 50 percent to 26 percent.

Gillespie fares much better among white voters, with 42 percent favoring him and 29 percent backing Northam. Gillespie also has a six-point edge among voters with a high school education or less.

Down the ticket, Democrats also fared better in the poll than their Republican opponents, albeit by small margins. For lieutenant governor, 43 percent of likely voters favor Democratic nominee Justin Fairfax, compared with 38 percent for Republican nominee Jill Vogel, with 15 percent undecided.

And for attorney general, 45 percent of likely voters support reelecting Democratic incumbent Mark R. Herring, with 39 percent backing Republican John Adams and 15 percent undecided.

All 100 seats in the House of Delegates are also on the ballot this fall, and the poll asked voters which party they’d rather see in control. Republicans control the chamber, with 66 seats to 34 for Democrats. The survey found that 48 percent of voters would prefer Democratic control, while 41 percent favor Republican control.

Democrats are stepping on the gas this year, with national money and attention focused on Virginia in the wake of Donald Trump’s surprise defeat of Hillary Clinton in the presidential election last fall. Determined to make the state a laboratory for themes that will play out on a bigger scale next year when far more states hold elections, Democrats are running more candidates in Virginia than at any time in memory.

With so many voters still undecided, this survey and last month’s Monmouth poll are early snapshots. It’s hard to predict how Hyra, the libertarian candidate, could affect the race. Earlier polls from Quinnipiac University and The Washington Post-Schar School, conducted before the June primary elections, found Northam ahead by eight to 11 points.

The VCU-Wilder School poll was a random sample of 806 adults in Virginia conducted over landline phones and cellphones between July 17 and 25. The overall survey carries a margin of error of about four percentage points, but the margin of error among the 538 likely voters surveyed is five points.

Scott Clement contributed to this report.