Donald Trump is gaining on his opponent in Virginia, according to a new poll. | AP Photo Poll: Trump gains on Clinton in Virginia

The race between Donald Trump and Hillary Clinton is drawing closer in Virginia, according to a University of Mary Washington poll released Thursday.

About 40 percent of Virginians surveyed who said they are likely to vote said they would support Clinton, while 37 percent backed Trump in the five-way ballot test question, with Libertarian nominee Gary Johnson at 8 percent, independent candidate Evan McMullin at 3 percent, and Green Party nominee Jill Stein at 1 percent. Among registered voters, Clinton's lead is slightly larger — 38 percent to Trump's 33 percent — while Johnson received 10 percent, McMullin 3 percent and Stein 2 percent.

Clinton led the race by 16 points (48 percent to 32 percent) in a Roanoke College poll last month and has not nominally trailed against Trump in any poll in the state since the start of the primary season in 2015.

The former secretary of state still holds a 9-point lead over Trump in the POLITICO Battleground States Polling Average for Virginia, taking into account the five most recent polls, dating back to a Washington Post survey conducted Aug. 11-14. That poll showed her with an 8-point edge matched head-to-head against the Republican nominee.

The University of Mary Washington conducted its poll from Sept. 6-12 via landlines and cellphones, surveying 1,006 adults with an overall margin of error of plus or minus 3.6 percentage points. Among the 852 registered voters surveyed, the margin of error is plus or minus 3.9 percentage points, while the sample of 685 likely voters carries a margin of error of plus or minus 4.4 percentage points.