Republican candidate for Virginia governor Ed Gillespie on Wednesday unveiled a new television ad highlighting his opposition to illegal immigration.

The spot, focused specifically the issue of "sanctuary cities" that do not fully cooperate with federal immigration enforcement, suggests that Gillespie is still working to boost turnout from a conservative base electorate that remains solidly behind President Trump, who lost Virginia last November to Democrat Hillary Clinton. Gillespie is squaring off against Democratic Lt. Gov. Ralph Northam this coming November.

"Who will keep your family safe? Ralph Northam cast the deciding vote in favor of sanctuary cities that let illegal immigrants who commit crimes back on the street. Ralph Northam: risky policies," the narrator says as the ad opens. "Endorsed by the Virginia Police Benevolent Association and 55 sheriffs, Ed Gillespie will ban sanctuary cities and get tough on illegal immigration. Ed Gillespie for a safer, stronger Virginia."

Gillespie barely won his June primary over immigration hawk Corey Stewart, chairman of the board of supervisors of Prince William County.

For Gillespie, there's nothing inconsistent about his opposition to sanctuary cities, which defy federal law and advertise themselves as safe havens for illegal immigrants. But it's a notable approach for a Republican who has always touted his support for legal immigration and worked in the past for organizations that focused on recruiting Hispanics to the GOP.

It could also complicate Gillespie's outreach to non-white voters in Democratic-leaning Northern Virginia suburbs of Washington, D.C., which has been extensive.

"Ed is proud to be the son of an immigrant, and knows we can both welcome legal immigrants and enforce our laws at the same time. As governor, Ed will stand with our law enforcement and first responders, protect Virginia from those who wish to do us harm, ensure that sanctuary cities that are a safe haven for violent criminals here illegally are never allowed in the Commonwealth, and combat violent gangs like MS-13 that The Washington Post recently reported as seeing a ‘resurgence' in the state," Gillespie campaign manager Chris Leavitt said in a statement.

Northam led Gillespie in latest RealClearPolitics average of recent polls, 44.4 percent to 38.6 percent. The Gillespie campaign declined to disclose details of this latest advertising buy.