Virginia Lt. Gov. Ralph Northam, left, and former Virginia congressman Tom Perriello are vying for the Democratic nomination for governor. (AP photos)

Former Virginia congressman Tom Perriello is gaining ground and is tied with Lt. Gov. Ralph Northam in the Democratic gubernatorial primary, according to a survey released Tuesday, while Republican Ed Gillespie is expanding his lead.

Perriello and Northam each drew support from 26 percent of Democratic-leaning voters in the poll by the Wason Center for Public Policy at Christopher Newport University. Just under half of those surveyed for the Democratic primary were undecided.

Support for Perriello increased 11 percentage points since the organization’s last polling of the race in late January but remained stagnant for Northam.

In the three-person GOP field, Gillespie has the support of 38 percent of Republican-leaning voters, an increase of five percentage points. Trailing behind the longtime GOP strategist are Prince William Board of County Supervisors Chairman Corey A. Stewart with 11 percent and state Sen. Frank W. Wagner (R-Virginia Beach) with 10 percent.

The poll is the latest to show Gillespie with a comfortable lead ahead of the June 13 primaries and a tight Democratic race since Perriello unexpectedly announced his candidacy in January.

Quentin Kidd, director of the Wason Center, said the outcome of the Democratic primary depends on who shows up at the polls in June. The traditional older, whiter electorate would favor Northam, but Perriello has a better path to victory if voters newly mobilized by the election of Donald Trump participate in the primary, Kidd said.

“This is going to sound odd, but is Perriello going to pull off a Donald Trump in this election and turn out voters who haven’t been turning out in Democratic primaries?” Kidd said.

The poll suggests divisions in the Democratic Party highlighted during the 2016 presidential primary are carrying over into the gubernatorial race.

Poll respondents who chose Hillary Clinton in the presidential primary support Northam over Perriello 34 percent to 25 percent. Those who preferred Sen. Bernie Sanders (Vt.) favor Perriello 32 percent to 21 percent. Clinton defeated Sanders by nearly 30 percentage points in Virginia.

While both gubernatorial campaigns reject comparisons to the Sanders-Clinton race, faint echoes of that contest are apparent in the Democratic contest. Northam is the favorite of the state party establishment, with endorsements from all but one Democrat holding state or federal office. And Perriello is running a populist campaign with a Sanders-style message that the economic system is rigged against many Americans.

Perriello and Northam are fairly unknown to the broader electorate, the poll found. About 7 in 10 voters had no opinion of either Democrat, while about 15 percent had favorable impressions. Northam’s support is concentrated in his home region of Hampton Roads, while Perriello’s strongholds are the Richmond area and the state’s south and southwest regions. Neither Democrat is strong in voter-rich Northern Virginia.

Gillespie, who nearly unseated Democratic Sen. Mark R. Warner in 2014, had the highest favorability ratings of the five gubernatorial candidates, with 23 percent. He also had the highest unfavorable rating, at 15 percent. Stewart was the only candidate whose unfavorability (12 percent) was higher than his favorability (11 percent).

Geographically speaking, Gillespie led his rivals in all regions, with his strongest support in Richmond and central Virginia and the southern and southwestern parts of the state. Stewart and Wagner had their best showings in their home turf of Northern Virginia and Hampton Roads, respectively.

Gillespie led his primary opponents across every demographic and ideological group. The poll also suggests Stewart’s attempts to court Trump supporters by mimicking the president’s brash style and harsh rhetoric about immigrants are falling short: A third of Trump primary voters back Gillespie, while Stewart and Wagner are drawing 11 percent each.

“A Trump effect adds some uncertainty to the Republican contest,” said Rachel Bitecofer, assistant director of the Wason Center. “Gillespie, the establishment favorite, is underperforming among voters who preferred Trump to all those insider Republicans last year. But Stewart and Wagner don’t seem to be picking them up, either.”

Other poll findings suggest favorable terrain for Democrats in the general election.

Just 37 percent of Virginia voters approve of Trump’s performance as president, with 59 percent disapproving. And half of voters say the commonwealth is heading in the right direction under Gov. Terry McAuliffe, a Democrat constitutionally barred from serving consecutive terms, while 55 percent say the country as a whole is headed in the wrong direction.

As one of just two states with a gubernatorial contest this year (the other is New Jersey), Virginia is shaping up to be a test of the national political mood.

The Wason Center also conducted its first polling of the lieutenant governor’s race.

It found Susan Platt, a former Altria lobbyist and aide to Joe Biden in the Senate, led the three-person Democratic field with 20 percent of voters. Justin Fairfax, a former federal prosecutor who narrowly lost the 2013 Democratic primary for attorney general, registered at 11 percent, while Gene Rossi, another former prosecutor, was at 6 percent.

On the GOP side, state Sen. Jill Holtzman Vogel (Fauquier) is ahead with 17 percent of Republican voters, while Del. Glenn R. Davis Jr. (Virginia Beach) drew 13 percent and state Sen. Bryce E. Reeves (Spotsylvania) had 10 percent.

About 6 in 10 Democratic- and Republican-leaning voters were undecided in their respective lieutenant-governor races.

Pollsters surveyed 831 registered Virginia voters between March 16 and Sunday, with a margin of error of plus or minus 3.7 percentage points. The margin of error is plus or minus 5.4 percentage points for Democratic-leaning voters and slightly higher for Republican-leaning voters.