Republican Ed Gillespie would tie with either of the Democrats vying for their party’s nomination in this year’s gubernatorial contest, according to new survey results released Wednesday.

Gillespie, a longtime GOP strategist and former counselor to George W. Bush, drew 40 percent of registered voters to Democratic Lt. Gov. Ralph Northam’s 39 percent in the poll by the Wason Center for Public Policy at Christopher Newport University. In a head to head matchup with former congressman Tom Perriello, who is competing with Northam for the Democratic nomination, Gillespie and Perriello tied at 39 percent each. A fifth of voters were undecided in both match-ups.

The poll found that Gillespie performed best against either Democrat compared with his two rivals for the GOP nomination, Prince William Board of County Supervisors Chairman Corey A. Stewart and state Sen. Frank W. Wagner (Virginia Beach).

Both parties will select their nominees in a June 13 primary.

Results from the same Wason Center poll that were released Tuesday showed a tied race for the Democratic nomination and Gillespie far ahead in the Republican primary. Gillespie is backed by 38 percent of Republican-leaning voters, compared to Stewart’s 11 percent and Wagner’s 10 percent.

The early polling suggests President Trump’s deep unpopularity in the commonwealth isn’t necessarily boosting Democrats in the governor’s race. Just 37 percent of voters polled approve of the president’s performance while 59 percent disapprove.

[McAuliffe blasts Trump budget as the ‘craziest’]

“I can’t see evidence yet that voters’ views on Trump are dragging Gillespie down,” said Quentin Kidd, director of the Wason Center. “Voters can have a really negative view of Donald Trump right now and not be leaking their views to gubernatorial races that are months and months down the line.”

Kidd said that can quickly change as Democratic groups start airing ads tying Gillespie to Trump.

The national parties are expected to pour resources into Virginia, one of just two states holding gubernatorial contests this year in what is shaping up to be a first test of electoral politics in the Trump era. Virginia and New Jersey are the only states with gubernatorial contests this year, and Virginia doesn’t cap campaign contributions or spending.

Gillespie is the best known of the five gubernatorial candidates, coming off a statewide campaign in 2014 when he nearly unseated U.S. Sen. Mark Warner (D). He is favored by nearly a quarter of voters, aiding him in head-to-head match-ups against Democrats.

The Wason Center poll also found Gillespie benefits in the general election from an edge among independent voters and a statistical tie with Democrats in voter-rich northern Virginia.

Gillespie is ahead of both Northam and Perriello among independents by a margin of 40 percent to 30 percent, according to the survey. Northam showed more strength in his home region of Hampton Roads, with a 14 point lead over Gillespie.

In head to head match-ups, each Democrat beats Stewart, Northam by eight points and Perriello by six. The two Democrats also beat Wagner, Northam by six points and Perriello by three.

In addition to the governor’s race, all 100 House of Delegates seats are on November’s ballot. In an attempt to regain control of that chamber, Democrats are fielding candidates in all 17 districts that Hillary Clinton won in the presidential election but are currently held by Republicans.

The Wason Center poll found that 48 percent of voters preferred a generic Democratic candidate for their district, compared to 41 percent who preferred a Republican.

Pollsters surveyed 831 registered Virginia voters between March 16 and Sunday, with a margin of error of plus or minus 3.7 percentage points.

A February poll by Quinnipiac University found either Democratic gubernatorial candidate beating any of the Republicans in head to head match-ups.