Former White House chief strategist Stephen K. Bannon will visit Virginia this weekend to help Rep. Dave Brat (R), who is in a tight race with Democrat Abigail Spanberger. Bannon’s visit is independent of the Brat campaign. (Jabin Botsford/The Washington Post)

Stephen K. Bannon will try to whip up support for Rep. Dave Brat (R) this weekend in a central Virginia congressional district where ties to President Trump’s controversial former chief strategist could cut both ways.

Bannon, who grew to prominence as leader of the hard-right Breitbart News Network, said he will screen a pro-Trump movie he has made — “Trump @War” — with the hope of inspiring the president’s supporters to help Brat get out the vote in the final days before Tuesday’s election.

The latest poll shows Brat, a former economics professor who won the seat four years ago after a shocking primary upset over then-House Majority Leader Eric Cantor (R), virtually tied with Democrat Abigail Spanberger, a former CIA agent, in the race for the 7th Congressional District seat.

“I know how to get the base jacked up, and that’s what needs to be done here,” Bannon, who announced his plans on the “John Fredericks Show” on Tuesday, said afterward in an interview with The Washington Post.

Bannon has been traveling to numerous congressional battlegrounds with his movie, appearing under the auspices of a nonprofit organization that cannot by law coordinate with political campaigns. Details for his visit to central Virginia were still being worked out.

Bannon, who grew up in Richmond, said he might also appear in Virginia’s 2nd District, which encompasses a large swath of Hampton Roads, where Rep. Scott W. Taylor (R) faces Democrat Elaine Luria.

“This is just another example of the mainstream media distorting the facts as we have no idea what Steve Bannon may be trying to do to help our campaign,” Brat campaign spokeswoman Katey Price said. “By law, the campaign cannot coordinate with outside groups, but of course, that doesn’t make catchy headlines for The Washington Post.”

Taylor spokesman Scott Weldon said he knew nothing about Bannon’s plans.

“This visit from the mastermind of Dave Brat’s 2014 campaign, Alt-Right propagandist Stephen K. Bannon, shows just how much Brat’s reelection campaign is failing,” Jake Rubenstein, a spokesman for the Democratic Party of Virginia, said in an email. “Virginians have had enough of the Bannons and Brats. It is time for leadership, unity and results — not more divisiveness and fearmongering.”

Bannon helped Breitbart become an influential voice for anti-establishment Republicans, a faction that critics said courted white nationalists. Bannon once described Breitbart as “the platform for the alt-right,” a term that became associated with white separatism, anti-Semitism and racism. Breitbart’s editors insisted that the site did not endorse those views.

Breitbart helped Brat pull off his unlikely primary win over Cantor, lavishing coverage on the underdog who was attacking the majority leader’s efforts to overhaul immigration laws.

Bannon left Breitbart to become Trump’s campaign manager in August 2016 and went on to serve as chief strategist in the White House. He was forced out of the White House post after seven months, after encouraging and amplifying the president’s divisive remarks in the wake of a deadly white supremacist demonstration in Charlottesville. He rejoined Breitbart after that but left in January amid an uproar over comments he made about Trump and his family to author Michael Wolff for Wolff’s book “Fire and Fury: Inside the Trump White House.”

Brat cruised to a 15-point reelection win two years ago but 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 Trump.

They are vying to represent a sprawling district that is a mix of Richmond suburbs and rural areas stretching from Culpeper County in the north to Nottoway County in the south. 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.

Bannon said Virginia elections could play an outsize role because polls there close relatively early on Election Day.

“The polls close at 7 o’clock [in Virginia]. If NBC comes up and [Rep. Barbara] Comstock, Taylor and Brat are not doing well, that will affect votes out west,” he said. He mentioned three competitive Virginia races — in the 7th, 2nd and 10th, where Comstock (R) faces tough odds against state Sen. Jennifer Wexton (D) in a Northern Virginia swing district that is hostile to Trump.

Bannon’s movie, “Trump @War,” mixes snippets of prominent Democrats and Hollywood figures lambasting the president with footage of violent anti-fascist protesters — all set to a stirring action-movie soundtrack to suggest the country is one midterm away from mob rule.

He said the film is not meant to persuade independents or even Republican moderates. “The movie is literally a movie to motivate the base,” he told The Post.