Five weeks before Election Day, Democrat Jennifer T. Wexton continues to lead Rep. Barbara Comstock (R) in the hotly contested race for Virginia’s 10th District, according to a poll released Tuesday.

Wexton, a state senator from Loudoun County, is ahead by six points, which is slightly less than her lead of about 10 points in June but still within the margin of error for the Monmouth University poll.

The Democrat leads 50 percent to 44 percent, compared with her 49 percent to 39 percent lead over the summer.

The poll surveyed 374 likely voters from Sept. 26 to 30. It has a margin of error of between 5.1 percentage points and 7.2 percentage points.

While Wexton’s favorability rating increased by six points, her unfavorability rating climbed by 19 points to 31 percent, compared with the June number, the poll found.

At the same time, likely voters have improved their attitudes toward Comstock, who is seeking a third term. She now has a favorability rating of 42 percent to 45 percent, compared with 34 percent to 43 percent.

“Wexton maintains a lead, but the gap has narrowed slightly since the summer,” said Patrick Murray, director of the Monmouth University Polling Institute. “Favorable opinions of Comstock have increased in that time, while the challenger has been met with a mixed response as voters have gotten to know her better.”

The change may be a sign that ads from Comstock’s campaign and the National Republican Congressional Committee have been effective.

The ads describe Wexton as the most liberal member of the state Senate, citing a left-leaning group, and attack her record as a state prosecutor. They describe Comstock as an independent with strong ties to the district.

Both candidates are working hard to appeal to the moderate district’s diverse, well-educated, suburban voters.

The 10th District includes all of Loudoun County and parts of Fairfax and Prince William counties, as well as Clarke and Frederick counties to the west.

Likely voters are divided along gender lines.

Comstock still leads among men, 50 percent to 43 percent, but by a smaller margin than she did in June, 56 percent to 36 percent.

The same thing happened with Wexton and female voters. More women support her than Comstock, 57 percent to 39 percent, but not as many as previously, 65 percent to 26 percent.

As is the case across the country, the Democrat is the preferred candidate of white voters with a college degree, and the Republican has more support from white voters without a college degree.

But Wexton’s lead over Comstock dropped among nonwhite voters, from 67 percent to 22 percent in June to 61 percent to 27 percent. The figure is important in a district where 44 percent of residents are nonwhite, census data show.

The race is considered one of the most competitive in the nation in part because President Trump lost the district by 10 points. But Comstock won it by six, a result her supporters say proves she can win this year.

Currently, 43 percent of 10th District voters approve and 52 percent disapprove of the job Trump is doing as president.

In the June poll, nearly 8 in 10 potential voters said it was very important or somewhat important to them to cast a vote that reflects their attitudes about Trump, according to the poll.

Now, nearly 3 in 4 voters say it is very important for them to cast a vote in the 10th District that reflects how they feel about Trump.

“These results suggest that the Republican base has been able to narrow the enthusiasm gap Democrats enjoyed over the summer,” Murray said. “The problem in this particular contest, though, is that they have not closed it.”

Recent sexual assault allegations against Supreme Court nominee Brett M. Kavanaugh have not changed the minds of most voters, 81 percent.

Asked to rank their top issues in the race among a list of six, nearly one-quarter of likely voters were most concerned about health care, followed by 22 percent for immigration.

Gun control, a major plank of Wexton’s campaign, and tax policy, a big focus for Comstock, both earned 13 percent of likely voters. Job creation had 11 percent and abortion 8 percent, the poll found.

Election Day is Nov. 6.