Corey Stewart, Republican nominee for U.S. Senate and chairman of the Prince William County Board of Supervisors, greets supporters at the Electric Palm restaurant in Woodbridge, Va., on election night. (Calla Kessler/Calla Kessler)

By placing an unabashed acolyte of President Trump at the top of the ticket, Virginia Republicans have energized their base but may have complicated GOP efforts to hang on to four crucial House seats, analysts said Wednesday.

Corey A. Stewart won the nomination to challenge Sen. Tim Kaine (D) Tuesday night with about 19,000 fewer votes than he received in the 2017 GOP primary, when he lost his bid for the gubernatorial nomination to Ed Gillespie.

Stewart pledged Wednesday to run on Trump’s economic and trade record but won support in the past by wrapping himself in the Confederate battle flag and emphasizing gun rights in the wake of school shootings. Now, he will set the GOP tone for the November midterms in an increasingly Democratic state.

“It’s been nine years since Republicans won a statewide election in Virginia, and at this rate, it may be a while longer,” said David Wasserman, a House analyst at the nonpartisan Cook Political Report. “I will also say that Stewart’s nomination could threaten Republican prospects down ballot, particularly in suburban House seats.”

The president has a particularly low approval rating in vote-rich Northern Virginia, where Rep. Barbara Comstock is determined to hold on to a suburban congressional district that Trump lost to Hillary Clinton by double digits in 2016.

Asked how Stewart’s candidacy could affect Comstock’s race, her campaign manager issued a lengthy statement framing the congresswoman as her own woman. She never mentioned Stewart. Yet he won every locality in Comstock’s district Tuesday night.

Republican candidate for U.S. Senate Corey Stewart speaks during the Virginia 6th District Republican Convention at James Madison University in Harrisonburg, Va., on May 19. (Daniel Lin/AP)

Wasserman said Stewart has done well in GOP primaries in Northern Virginia because moderate Republicans vote in Democratic primaries. Virginia primaries are open to all registered voters.

“They no longer consider themselves Republicans in the era of Trump,” he said. “The only voters who are left are Corey Stewart voters.”

Stewart’s race was one of several Tuesday in which the winners came from the Trump wing of the party. His victory thrilled his supporters — “Long live Stewart!” one yelled at his party — and drew an early-morning congratulatory tweet from Trump.

“Congratulations to Corey Stewart for his great victory for Senator from Virginia,” the tweet said. “Now he runs against a total stiff, Tim Kaine, who is weak on crime and borders, and wants to raise your taxes through the roof. Don’t underestimate Corey, a major chance of winning!”

Stewart has chaired the Prince William Board of County Supervisors since 2006, winning elections in Virginia’s second-largest jurisdiction with a populist, no-holds-barred style that in many ways mirrors Trump’s and that he believes could be successful in Virginia this fall.

He is known for mobilizing the hard-line conservative and tea party wings of the Virginia GOP by embracing issues few establishment Republicans would touch: trumpeting “Southern heritage,” appearing with Jason Kessler, organizer of the “Unite the Right” rally that sparked deadly unrest in Charlottesville; and calling Paul Nehlen, a self-professed “pro-white” candidate for Congress in Wisconsin, his “personal hero.” (He has since distanced himself from Kessler and Nehlen).

Stewart said Wednesday that he believes Trump is poised to reap the political rewards of the GOP-backed tax bill and robust economy, and plans to “tie myself to his successes.”

“I’m going to support the president,” he said.

Kaine, the 2016 Democratic vice presidential nominee, said he will run for reelection as an “upbeat problem solver,” a stark contrast with Stewart, who has promised to be ruthless and vicious.

“Corey has never failed to try to find ways to divide people, whether it’s harsh rhetoric about folks he doesn’t like or whether it’s even cozying up to purveyors of white supremacy or anti-Semitic views and sort of stoking those for his own political gain,” Kaine said.

Asked for his reaction to Trump’s tweet, Kaine told reporters, “I laughed at it,” and said name-calling is a sign of desperation.

Dreading the prospect of another incendiary statewide run from Stewart, many Republican elected officials had staked their hopes on the campaign of Nick Freitas, a two-term state lawmaker and former Green Beret.

Freitas lost to Stewart by less than 2 percent, or about 5,200 votes, according to unofficial results.

“It’s one of those things you don’t want to believe, and then it hits you in the face,” said Shaun Kenney, a blogger and former executive director of the state GOP.

In addition to Comstock, Republican Reps. Scott Taylor of Virginia Beach and Dave Brat of the Richmond suburbs are considered most vulnerable this fall, followed by Denver Riggleman, who is running to replace Rep. Thomas Garrett, who is not seeking reelection.

Each seat is considered crucial to Democratic hopes of gaining a majority in Congress, and to Republican efforts to keep their power intact.

Patricia Bast Lyman, an immigration attorney from Fairfax who is acting as a Stewart surrogate, said the candidate’s base of support in Prince William, a bellwether Virginia county, will be a key factor in his Senate bid.

“Corey Stewart for 12 years has been governing a blue majority-minority county,” Lyman said. “He gets the job done. He has a statewide appeal that makes him absolutely the strongest contender against Tim Kaine.”

But other Republicans said Stewart’s nomination put the Senate seat out of reach.

Republican David Ramadan, a former state lawmaker, tweeted that Stewart’s win effectively handed Kaine “an easy re-election in November . . . good work . . . MORONS.”

The tweet included an earlier post by Kaine’s campaign spokesman, Ian Sams, showing Stewart next to a giant Confederate flag.

Fenit Nirappil and Laura Vozzella contributed to this report.