RICHMOND — Rep. Dave Brat (R) and Democrat Abigail Spanberger are in a dead heat in Virginia’s 7th Congressional District, according to a poll released Monday, as the race in the onetime GOP stronghold enters its final week.

The candidates are in a statistical tie, with 46 percent of likely voters in favor of Spanberger and 45 percent for Brat, a poll from the Wason Center for Public Policy at Christopher Newport University found. Libertarian candidate Joseph Walton has support from 4 percent, and 3 percent were undecided.

Spanberger’s lead is wider, though still within the margin of error, among voters who said they were definitely going to vote and were very enthusiastic about the election. She leads 48 percent to Brat’s 45 percent among those “committed” voters, with 3 percent in favor of Walton and 3 percent undecided.

Spanberger could benefit from a 16-point “enthusiasm gap,” with 78 percent of Democrats “very enthusiastic” about voting, compared with 62 percent of Republicans who feel that way about Brat.

Brat, a former Randolph-Macon College economics professor, won the seat four years ago after pulling off a shocking primary upset over Eric Cantor, then the House majority leader. He cruised to a 15-point reelection win two years after that.

This year, Brat faces a strong challenger in Spanberger, a former federal law enforcement agent and CIA operative whose résumé may appeal to swing voters and moderate Republicans turned off by President Trump.

They are vying to represent sprawling district that is a mix of Richmond suburbs and rural areas stretching from Culpeper to Nottoway County. Trump, who has endorsed Brat, is popular in the rural areas, but he has greatly energized Democrats in the suburbs.

Republican strength in the district has been waning, with victory margins shrinking. Presidential candidate Mitt Romney won the 7th District by 11 percentage points in 2012. Trump won it by six points in 2016. In the 2017 governor’s race, Republican Ed Gillespie beat Democrat Ralph Northam there by less than four points.

“The fact that a district like the 7th is competitive is strong evidence that 2018 should produce a strong midterm effect that benefits Democrats,” said Rachel Bitecofer, assistant director of the Wason Center. “This district has a significant structural advantage for Republicans. But that advantage can be overcome with strong turnout in the Richmond suburbs. Democratic turnout will determine which candidate prevails on Election Day.”

The poll found the district closely divided on Trump, with 51 percent disapproving of the job he is doing and 47 approving. Among those voters, 43 percent strongly disapprove of the president’s performance and 30 percent strongly approve.

In the U.S. Senate contest, likely voters in the district favor Sen. Tim Kaine (D) over Republican Corey Stewart, a Trump-style provocateur, 48 percent to 43 percent.

Given the polarized nature of the district, Brat and Spanberger have both walked a fine line with Trump. Brat, a member of the conservative Freedom Caucus, has backed Trump’s effort to harden the border and supported a failed GOP effort to “repeal and replace” the Affordable Care Act. But he has also sought to play up his work on less partisan issues, such as the opioid crisis, human trafficking and veterans’ health care.

Spanberger has taken issue with many of Trump’s policies but has not adopted the “resistance” mantra common among many other Democratic hopefuls. She supports the ACA and calls for comprehensive immigration reform, but also touts her national security credentials and says she wants a secure border. She has said she would not support Rep. Nancy Pelosi (D-Calif.) for Speaker if Democrats regain control of the House.

The poll finds Democrats are more strongly behind Spanberger than Republicans are for Brat. Among likely voters, 96 percent of Democrats plan to vote for Spanberger, compared with 89 percent of Republicans for Brat. But Brat has an eight-point advantage among independents, with 46 percent for him and 38 percent for Spanberger.

The survey finds a large gender gap, with men favoring Brat by 15 points (52 percent to 37 percent) and women backing Spanberger by 14 points (53 percent to 39 percent).

Spanberger has a nine-point lead among likely voters age 44 or younger, while Brat leads by six points among voters 45 and older.

The poll is based on 871 interviews of registered 7th District voters who have voted in at least two of the past four elections or who were new voters to Virginia in 2017. It was conducted Oct. 18-27 on landlines and cellphones.

The survey has margin of error of plus or minus 4.2 percentage points. The model based on “committed” voters has a margin of error of plus or minus 4.4 percentage points.