“It feels like my campaign, doesn’t it?” Corey A. Stewart said of Republican Ed Gillespie’s commercials as Tuesday’s election loomed in Virginia. “I feel vindicated by it. What is it that they say? Imitation is the best form of flattery.” (Jahi Chikwendiu/The Washington Post)

Corey A. Stewart may have lost Virginia’s Republican nomination for governor, but he feels newly emboldened as Ed Gillespie, the candidate who defeated him, has co-opted the polarizing issues at the center of his political playbook.

In TV commercials and on the stump, Gillespie has laid claim to defending Confederate monuments and linked the international gang MS-13, also called Mara Salvatrucha, to undocumented immigrants, aping President Trump’s populist agenda as channeled by Stewart in his near-upset in the Republican primary in June.

“It feels like my campaign, doesn’t it?” Stewart said of Gillespie’s commercials as Tuesday’s election loomed, his fulsome grin punctuating his delight. “I feel vindicated by it. What is it that they say? Imitation is the best form of flattery.”

A cocksure disciple of Trump, Stewart was dismissed as an unknown, underfunded candidate by Virginia’s GOP establishment when he challenged Gillespie, the former lobbyist, Republican Party chair and adviser to President George W. Bush.

But the mockery turned to astonishment when Stewart, chairman of Prince William County’s Board of Supervisors, came within a percentage point of victory, albeit in a low-turnout primary.

Trump-like Corey Stewart has a little advice for Ed Gillespie who was supposed to crush him in the GOP primary for Virginia governor. (Dalton Bennett/The Washington Post)

Now, as Gillespie has appropriated his tactics and polls suggest he has narrowed the gap with Lt. Gov. Ralph Northam (D), Stewart’s stature as a political force is growing as he seeks to challenge Sen. Tim Kaine (D) next year.

“Corey Stewart is the reason Gillespie is going to win,” Stephen K. Bannon, the former White House chief strategist and Trump’s campaign czar, said in an interview. “It was the Trump-Stewart talking points that got Gillespie close and even maybe to victory. It was embracing Trump’s agenda as personified by Corey’s platform. This was not a competitive race four weeks ago. You could have stuck a fork in Gillespie.”

Bannon described Stewart as the “titular head of the Trump movement” in the commonwealth, even as he volunteered that he was the one who issued the order to fire Stewart as Trump’s Virginia co-chair during the 2016 campaign. But he said he did so to placate Reince Priebus, who was infuriated that Stewart — ignoring a command from GOP leaders — held a protest outside the Republican National Committee’s Washington headquarters to complain that the party wasn’t fully embracing Trump.

“I think the reason we didn’t win Virginia is that we fired Corey — otherwise, we would have been more competitive,” Bannon said. “I was a Corey Stewart fan at the time, but I had to keep peace in the valley.”

Virginia was the only Southern state to go for Democrat Hillary Clinton, who beat Trump by five points.

Bannon is now leading an effort to target establishment Republican senators aligned with Senate Majority Leader Mitch McConnell (R-Ky.) in next year’s midterm elections. But he said that he also has an eye on Kaine and that insurgent Republicans “see Virginia in play.”

The latest stories and details on the 2017 Virginia general election and race for governor.

“The only way to beat Kaine next year is with a full-on Trump agenda, and by nationalizing the race with a candidate like Corey Stewart,” Bannon said. “It has to be someone who can articulate the Trump agenda.”

No other Republicans have declared an intention to run for the Senate seat yet.

Bannon’s view of Stewart is not shared by Virginia’s Republican establishment, which may be why Gillespie has refrained from appearing with him on the campaign trail.

“If Alabama had [former governor George] Wallace, Virginia gets Stewart — it’s massive resistance 2.0,” said Shaun Kenney, former executive director of the commonwealth’s Republican Party. He was referring to the strategy to fight desegregation in Virginia declared in the 1950s by Sen. Harry F. Byrd, a conservative Democrat and power broker.

“Corey is running because Gillespie couldn’t put him away,” Kenney said. “It’s not a vindication as much as it is a mestastization. It’s like turning your back on a bad debt. At some point the interest comes due and the interest, in this case, is the nationalist wing of the party. They feel strength now.”

Democrats, for their part, struggle to contain their glee over Stewart as Kaine’s potential challenger.

“How lucky could you be to get Corey Stewart running against you in a general election?” asked state Sen. Richard L. Saslaw (D-Fairfax). “I pray for it. Corey Stewart is lucky he’s not in a straitjacket.”

For all his populist zeal, Stewart is a veritable lord of the manor, residing on an 18th-century plantation in Prince William once owned by George Washington’s first biographer, and where Washington is said to have spent a night.

Stewart and his Swedish-born wife, Maria, have furnished their 13-room home with Victorian settees and oil paintings that they bought at antique auctions. The plantation’s 25 acres include countless trees, manicured hedges and not a single yard sign promoting Virginia’s Republican candidate for governor (two signs for Jill Vogel, running for lieutenant governor, were leaning against the garage door).

“We’ve got to get one, we’ve got to get one,” Stewart said of a Gillespie sign, his tone not exactly oozing urgency as he got into his red pickup truck last week, on his way for lunch at a nearby restaurant.

While he tells Republican audiences he will vote for Gillespie, and says they should too, Stewart struggles to show enthusiasm for a candidate he describes as “boring.”

“He’s your standard Republican — very cautious, very reluctant to go out on the edge on any controversial issue,” Stewart said between bites of a salmon salad with goat cheese and champagne-vinaigrette dressing. But Stewart said he was “pleasantly surprised” to see Gillespie’s ads about MS-13 and protecting monuments that were “somewhat edgy. It may be enough to bring him over the line. Maybe not.”

“I was ahead of the game in addressing those issues — in fact, I was even ahead of the president,” Stewart said of Trump’s embrace of Confederate monuments. “He basically echoed the same words I used.”

At Bannon’s urging, Stewart said he has offered to campaign for Gillespie, an offer that he said was being ignored even Sunday when the ticket was planning a closing rally in southwest Virginia. Nevertheless, Stewart has sought to promote the Republican ticket, appearing at a “Bikers for Trump” rally last weekend, where he roused the crowd when he proclaimed four categories of Democrats — “criminals, communists, crackheads and the weirdos.”

In the interview, Stewart said that if he is the GOP’s nominee against Kaine, he would focus more on economic issues while expecting the Democrats to attack him for defending the monuments and for being anti-immigrant. “Then I’m going to say to the people, ‘Look, the Democrats are focusing on this garbage, I’m talking about the economy,’ ” he said. “Tim Kaine is the radical, the Democrats are the radicals.”

Stewart said that type of tactic has served him well as he has won four elections in Prince William, a majority-Democratic county. “I always focus on the issues that people are concerned with at that time,” he said. “Some might say, ‘Isn’t that being an opportunist?’ From my perspective, it’s simply addressing the needs of the people you represent.”

Similar to Trump branding opponents on Twitter, Stewart tagged Gillespie as “Establishment Ed” in the primary. He already is asking supporters to help him conceive monikers for Kaine, whom he described as “a little weird.”

“Crazy Kaine, Kooky Kaine,” he said, offering potential nicknames. “People think he looks like ‘The Joker’ — crazy, psychotic, unhinged.”

Ian Sams, a spokesman for the Kaine campaign, dismissed Stewart.

“Who cares what Corey Stewart wants to nickname anyone?” Sams said. “Corey runs around doing his best Donald Trump impression and next to nothing for his constituents in Prince William County. He’s devoid of ideas to make Virginians’ lives better and instead wants to run a pigsty campaign driven by ugly headlines. While Corey hurls insults, Tim Kaine is fighting in the Senate to protect Virginians’ health care, help create jobs and keep Americans safe.”

Stewart makes no apologies for his coarse language, saying: “We need some honesty. That’s what people want. They’re tired of being placated by soft, fake words.” If he wins a Senate seat, he promises to be “provocative” and “hard-charging and to the right of every other member of the United States Senate. I will be deliberately pushing buttons.”

“Shifting the political spectrum to the right, jerking the country back to the right — that’s what I want to do,” he said. “If you want to energize the base, you have to talk about these emotional issues.”

At moments, he acknowledged, he goes too far.

For example, he said he regrets appearing during the primary campaign at a news conference with members of the right-wing group known as Unity and Security for America, which was protesting the removal of a Robert E. Lee statue in downtown Charlottesville. Stewart said he was unaware of extremist positions taken by the group’s leader, Jason Kessler, who later organized a white-supremacist rally in Charlottesville.

“When I realized what he was, I had nothing to do with him,” Stewart said. “We should have done a better job finding out who he was. I make mistakes. That’s not who I am. I don’t have to agree with everybody, but there are some things that are so reprehensible, you want nothing to do with them.”

He also expressed regret for having recently poked fun at the transgender candidate challenging Del. Robert G. Marshall (R-Prince William). “His name was Dan Roem. Now it’s Danica Roem,” he told the “Bikers for Trump” rally, eliciting laughs. “Not that there’s anything wrong with that!”

Reflecting on that moment five days later, Stewart said: “I don’t want to make fun of anybody like that. I don’t like to bully people like that.”

Stewart said he tests his rhetorical missiles on a group of advisers before firing.

For example, he said that when conceiving of his four categories of Democrats, he had planned on including “hypocrites” and “perverts.” But he replaced “hypocrites” with “communists” because “it’s not hard enough.”

And he scrapped “perverts” because “women don’t like that term.”

So he went with “weirdos.”

“Every once in awhile, you’re going to say something over the top,” Stewart said. “But that way, at least people know you’re real.”