“Who will keep your family safe?” begins the attack ad, blasting the Democratic candidate for casting “the deciding vote in favor of sanctuary cities that let illegal immigrants back on the street,” over the sound of police sirens.

That’s not an unusual tone for a GOP ad, especially in the Trump era. But the candidate it says will “get tough on illegal immigration” is surprising: Virginia gubernatorial nominee Ed Gillespie, who for more than a decade has been one of the GOP’s loudest champions for immigration reform.

The spot, Gillespie’s first negative ad ahead of this November’s election, is part of his dramatic rightward tonal shift on immigration issues. And it shows how difficult a balancing act Republicans face in swing territory, torn between a furious base and suburban swing voters who detest President Trump.

Not long ago, Gillespie was a leading voice pushing his party to embrace immigrants.

He chaired the Republican National Committee under President George W. Bush, playing a key role in pushing Bush’s failed efforts at comprehensive immigration reform. He was one of the masterminds behind Bush’s 2004 campaign that actively wooed Latinos — including the “Viva Bush” yard signs that popped up across the nation — and helped Bush hit the high water mark of recent GOP nominees with more than 40 percent of the Hispanic vote, according to exit polls.

As chairman of the Republican State Leadership Committee, a group focused on state-level races, Gillespie laid out the goal of recruiting 100 Hispanic GOP candidates for the 2014 elections. And he was deeply involved in helping pro-immigration reform Republicans develop their message ahead of the failed 2013 push for comprehensive immigration reform, conducting message testing, polling and focus groups to figure out how to sell conservative voters on the issue.

“The more information about immigration reform [conservatives] get, the more likely they are to be supportive of it,” Gillespie said back in 2013.

Gillespie’s moderate tone on immigration (and a GOP wave election) helped nearly led him to a shocking upset against Sen. Mark Warner (D-VA) in 2014 — he lost by just two points after trailing by double digits in late polls.

But things have shifted dramatically since then within the party. And while Republicans have moved right on immigration, Virginia has continued to drift left, driven by huge growth in Washington, D.C.’s diverse and well-educated suburbs, leaving Gillespie on unstable footing.

“The Ed Gillespie of 2014 had a wind at his back. The Ed Gillespie of 2017 has the wind at his face. It’s not over, but it’s getting pretty stratified pretty quick,” said former Rep. Tom Davis (R-VA).

Gillespie was nearly upset in a primary earlier this summer against an underfunded and underestimated challenger, barely defeating former Trump state director Corey Stewart, who’d spent his campaign railing against illegal immigration and defending Confederate memorials. Gillespie currently trails Virginia Lt. Gov. Ralph Northam (D) by single digits in most recent public and private polls.

Republican pollster John McLaughlin helped Gillespie conduct some of those 2013 immigration focus groups, and currently works for a number of down-ballot candidates in the state. He said there’s been a major shift within the GOP base after years of inaction during the Obama administration. He should know: He’s also a top pollster for Donald Trump.

“The base has gotten more polarized on this. To them, immigration is a component of national security,” said McLaughlin. “As the system remained broken for eight years and the situation got worse it got even more polarized where within the Republican Party they want to see the borders secured [and more limits on immigration].”

McLaughlin disagreed with other Republicans’ analysis that Gillespie was struggling to win back Stewart voters, saying his own data showed the GOP voters who always turn out for off-year elections had come home to Gillespie. But with Northam ahead in the polls and less than two months until election day, he said Gillespie is likely looking to woo 2016 Trump voters who don’t usually turn out for off-year elections to close the gap.

Opposition to sanctuary cities is a much better issue for Republicans than other immigration issues. Even Democrats admit that it’s a winning argument politically for Gillespie, though they point out that it’s a hollow attack since there are no sanctuary cities in Virginia and statehouse Republicans engineered a show vote on the issue to force Northam on the record.

And Gillespie hasn’t abandoned his commitment to strong GOP outreach to minority communities. He talked about his immigrant parents in his first campaign ad, and on Wednesday made a bold campaign promise to push for sentencing reform in the state, including a call to decriminalize minor marijuana possession until the third time a person is arrested.

But his hawkish statement after Trump ended the Deferred Action for Childhood Arrivals program shows that the sanctuary cities ad is no aberration.

Gillespie joined most Republicans to call on Congress to find a fix to allow the 800,000 undocumented immigrants brought here as children to stay in the U.S. But he didn’t criticize Trump — and the Republican he singled out for praise, anti-immigration hardliner Sen. Tom Cotton (R-AR), wants to tie any fix for the DACA program to new limits on legal immigration. On top of that, Gillespie took the occasion to highlight his opposition to giving in-state tuition to those children.

“I’m encouraged that Senator Tom Cotton and others say they are going to find a legislative solution to DACA. I don’t believe that children should be punished for decisions that were not their own, but at the same time, it is important for us to enforce our laws. If an illegal immigrant commits a crime, he should be deported,” he said in a Tuesday statement. “And we should not allocate scarce tax dollars for in-state tuition to illegal immigrants, and provide them scarce slots at our public colleges and universities over Virginia citizens.”

In recent weeks, Gillespie hired a controversial former Trump and Stewart staffer to help run his field operations in the state’s southwest and has sounded a more hardline tone on Confederate monuments in the wake of the violence in Charlottesville, though he did criticize Trump for his failure to condemn white supremacists in its aftermath.

Northam’s campaign blasted Gillespie’s attacks.

“Ed’s resorting to fear-mongering because he can’t win on positive policy proposals. He knows the ad he put up is disingenuous and he’s turning his back on decades of what he’s tried to fight for within the Republican Party,” said Northam spokesman David Turner. “He’s completely abandoned his brand in favor of Trump-style tactics.”

Gillespie is far from done in Virginia’s gubernatorial race. But his own allies admit he’s playing from behind.

“It’s hard to reach out in the era of Trump for Republicans. The well has been poisoned,” said Davis.

ABOUT THE AUTHOR

Cameron Joseph is Talking Points Memo's senior political correspondent based in Washington, D.C. He covers Capitol Hill, the White House and the permanent campaign. Previous publications include the New York Daily News, Mashable, The Hill and National Journal. He grew up near Chicago and is an irrationally passionate Cubs fan.