In a new negative ad and revved-up rhetoric, Ed Gillespie, the Republican nominee for Virginia governor, has begun to echo the right-wing populism of President Donald Trump in his bid to defeat Democratic Lt. Gov. Ralph Northam in the November election.

Gillespie, a former chairman of the Republican National Committee who is known as a mild-mannered fiscal conservative, is slamming Northam in a new ad for allegedly casting the “deciding vote in favor of” so-called sanctuary cities. In fundraising emails to supporters, Gillespie has also taken a tougher line against the removal of Confederate monuments, and he used red-meat rhetoric to malign The Washington Post. He has even hired a controversial former Trump campaign staffer.

It’s all part of the delicate balance Gillespie must strike as he courts swing voters along with the GOP base that turned out for Corey Stewart, Gillespie’s populist primary opponent who nearly pulled off an upset win in June, according to Mark Rush, a politics professor at Washington and Lee University in Lexington, Virginia.

“If the primary hadn’t been so close, he could have been more moderate. Now he needs to work to get the Stewart voters as well,” Rush said.

Quentin Kidd, a Virginia politics watcher at Christopher Newport University in Newport News, described Gillespie’s attempts to excite the Republican base while winning over moderate constituencies, such as college-educated women in northern Virginia, as a “geometry problem.”

“He needs to appeal to his base and the median voter at the same time, and Gillespie’s base is more demanding on him than Northam’s is on him,” Kidd said.

“Sanctuary cities” is a broad, frequently politicized term used to describe cities that limit their cooperation with federal authorities on immigration enforcement, most commonly by refusing to detain someone on behalf of the federal government for possible immigration violations. They often cite the chilling effect that this type of cooperation has on undocumented immigrants’ willingness to report or help solve crimes and the legal challenges inherent in holding someone without an arrest warrant.

Gillespie’s ad about a vote on these localities is at once his most striking use of the immigration-driven politics that elected Trump and his least-significant policy shift.

Gillespie had already declared his opposition to cities restricting immigration cooperation while running against Stewart in May. And in July he proclaimed his commitment to “eradicating” gangs and restrictions on cooperation with federal authorities.

The Washington Post/Getty Images Ed Gillespie, the Republican candidate for Virginia governor, is revving up the populist rhetoric in his fight against his Democratic opponent, Lt. Gov. Ralph Northam.

Still, the 30-second ad Gillespie released Wednesday, “Ralph Northam’s Risky Policies,” is notable for the tough tone it takes and its omission of key nuances about Northam’s vote.

“Ralph Northam cast the deciding vote in favor of sanctuary cities that let illegal immigrants who commit crimes back on the street,” the narrator says in the ad.

In fact, rather than voting “in favor” of so-called sanctuary cities, Northam merely cast the tie-breaking vote against a bill in the Virginia Senate that would have forbidden Virginia localities from restricting cooperation with federal authorities on immigration matters.

And Northam only had the opportunity to vote on it in February because Republican Senate Majority Leader Thomas Norment’s initial vote against it created a tie that forced Northam, as lieutenant governor, to cast a politically fraught vote against it. In a subsequent iteration of the legislation, the Senate passed the bill with Norment’s support. Democratic Gov. Terry McAuliffe vetoed it.

Gillespie has also sharpened his rhetoric in support of Confederate monuments. In a fundraising email to supporters this week, The Washington Post reported, the Gillespie campaign invited respondents to show their support if they agreed with him that “these statues should stay right where they are and we should teach history — NOT erase it.”

Gillespie had previously stated that it was up to local communities to decide how to deal with Confederate monuments, a stance shared by Northam, a multi-generation Virginia native who has nonetheless expressed his disdain for the statues in the wake of the violence in Charlottesville in August. Northam also had promised to be a “vocal advocate” for their removal.

And in another email blast this week, Gillespie tried to raise money off of critical coverage in The Washington Post, which he dubbed an “out-of-state media outlet ... working overtime to elect Democrat Ralph Northam as Virginia’s next governor.” The email even echoed Trump’s attacks against the Post’s owner, Amazon CEO Jeff Bezos, calling him a “Seattle billionaire.”

(Although the Post is headquartered in Washington, it is a regional newspaper that closely covers Virginia politics with a bureau in the state capital, Richmond.)

Finally, Gillespie’s campaign this week hired Jack Morgan, the Trump campaign’s southwest Virginia field director, to do similar grassroots organizing. Morgan, an evangelical Christian preacher, has a history of fiery right-wing rhetoric, including recent remarks calling the push for the removal of Confederate monuments “nothing but pure communists trying to come after America again.” He supported Stewart in the primary, warning that nominating the “lobbyist” Gillespie would be a “disaster.”

David Abrams, a spokesman for Gillespie’s campaign, insisted that Gillespie’s ad on sanctuary cities and recent comments about Confederate monuments and The Washington Post were unremarkable reflections of his long-standing positions. Gillespie still believes that removal of the monuments is a decision best left to localities but he personally opposes removals, which he has expressed in the past, Abrams said.

In addition, Abrams highlighted previous occasions when Gillespie had criticized The Washington Post on Twitter and in a blog post. As for Morgan, the campaign is “thrilled to have him on the team,” Abrams said.

“Ed is laser-focused on putting forward policies that will create jobs, raise take-home pay, help people lift themselves out of poverty, improve our public schools and ease traffic congestion,” he said.

Liz Mair, a libertarian-leaning Republican strategist based in northern Virginia, was untroubled by Gillespie’s immigration ad and hiring of Morgan, noting that alumni of successful campaigns are often hired by politicians from the same party with differing views.

She suggested, however, that if Gillespie is too vocal about the Confederate monuments in the final months of the campaign, it risks coming off as inauthentic.

“That just doesn’t read as Ed Gillespie,” she said.

The Northam campaign sees in Gillespie’s new tone an opportunity to tie him to Trump, whose popularity in Virginia has been steadily declining.

“Ed Gillespie is abandoning any pretense of being the moderate Republican he once portrayed himself to be because he’ll say and do anything to get elected, principles be damned,” said Northam spokeswoman Ofirah Yheskel. “The Trumpification of Ed is moving full steam ahead, and he’s not stopping the train for anyone.”

Democrats are eager to put wins on the board in Virginia’s elections this November. It is one of two states ― the other is New Jersey ― where state-level elections give the party a chance to make a comeback after its devastating losses in 2016.

Party leaders view Virginia, where Hillary Clinton defeated Trump by 5 percentage points in November, as an especially ripe place to consolidate gains made there in recent years.

Gillespie has kept the race very close thus far, however. The lieutenant governor led Gillespie, 42 percent to 37 percent, among likely voters, according to an August poll conducted by Virginia Commonwealth University.