Since 2014, the city has shielded undocumented immigrants from federal enforcement, but Pennsylvania's senate race threatens to change all that.

Immigration issues have been at the heart of the Democratic National Convention in Philadelphia this week, from the 28-year-old undocumented immigrant who won over crowds on the first night of the convention to the speech from Philadelphia mayor Jim Kenney, which compared Donald Trump's views on immigration to the Know Nothing Party. But in the shadow of the convention, another immigration policy has become an election year wedge issue: Philadelphia's status as a "sanctuary city," which makes it a relative safe haven for undocumented immigrants.

Sanctuary cities like Philadelphia do not fully cooperate with the federal government when it comes to immigration enforcement and can shelter undocumented immigrants (and other non-citizens) from deportation. While Philly isn't the only sanctuary city in the US, it's drawn particular attention this summer, after Senator Pat Toomey—a Republican from Pennsylvania—blasted the policy in Philadelphia, portraying it as a costly safety risk.

In late June, Toomey introduced legislation in the Senate that would have blocked grants to cities that don't cooperate with federal immigration officials, but the bill failed to advance. Since then, he's warned of another scenario: that Philadelphia could lose federal grant money if it doesn't comply with new regulations put forth by the Department of Justice.

"If immigrants don't report crimes or cooperate in investigations because they're afraid of being deported, we are far less safe."

While the Justice Department has neither confirmed nor denied Toomey's claim, the city would only stand to lose about $1.7 million of the $342.6 million the city expects to get in federal funds next year, according to a report in the Philadelphia Inquirer.

"It's just scapegoating immigrants in order to fear-monger and get more votes," said Nicole Kligerman, a community organizer for the New Sanctuary Movement of Philadelphia, in an interview with VICE. "I think it's a scare tactic."

Toomey is in a close reelection race with Democrat Katie McGinty and has sought to paint McGinty as someone who would allow Philly's "extreme sanctuary rules." Faced with a barrage of criticism from the incumbent, McGinty earlier this month urged Mayor Kenney, a fellow Democrat, to reconsider parts of the sanctuary policy—specifically, calling for more communication between local law enforcement and federal immigration authorities, the very thing sanctuary cities protect.

Mayor Kenney has stood steadfastly by the measure, saying immigrants might be afraid to report crimes to the police if they believe they might be deported. "It's a public safety issue," a spokesperson for the mayor told VICE. "If immigrants don't report crimes or cooperate in investigations because they're afraid of being deported, we are far less safe."

That logic resonates with people like Olivia Vazquez, a Mexican immigrant who grew up in the Italian Market section of South Philadelphia. When she moved to the United States at the age of ten, neither she nor her mother had legal immigration status. She remembers hearing about neighbors who were arrested for low-level crimes and then kept in custody until immigration agents could pick them up.

"If they were driving without a license or if they had a DUI, they were being held at the police station for more than the 48 hours because [the authorities] wanted to run their information through the database," Vazquez, now 22, told VICE. "And if they were undocumented, they would eventually be put into deportation proceedings, just for driving without a license."

Then something changed. In April 2014, then mayor Michael Nutter signed an executive order that curbed what he considered an overly aggressive use of "detainers," the requests made by immigration officials when they want a local jail to hold someone suspected of violating immigration law.

Nutter's policy did two things: First, it prohibited local authorities from holding a non-citizen after the time when the person should be released from custody for the original reason for his or her detainment (unless the federal government files separate criminal charges). Second, the measure called for local police to stop notifying the Department of Homeland Security when a person was released, unless that person was a violent felon and the federal government had obtained a warrant.

Vazquez, who now has a work permit and is employed at a Philadelphia-based nonprofit called Juntos, says the executive order fostered a new level of trust within immigrant communities that had previously felt "terrorized" by authorities.

The sanctuary city branding seemed like a natural fit for Philadelphia, a place known for courting immigrants. In July 2015, Nutter even traveled to Puebla, Mexico, to strengthen ties between the two cities. Today, about an eighth of Philadelphians are immigrants, roughly on par with the national average.

While the sanctuary policy has won accolades in progressive circles, it hasn't been without controversy. For starters, Nutter himself rescinded the order in December 2015, just days before leaving office. (His reasons for doing so were not entirely clear, and the former mayor did not respond to a request for comment.) But the incoming mayor, Jim Kenney, promptly reinstated the city's original measure after taking office two weeks later.

The policy has faced additional scrutiny from the Obama administration. Jeh Johnson, the head of the Department of Homeland Security, traveled to Philadelphia in May to convince the city to drop its sanctuary status, only to be rebuffed by Mayor Kenney.

The mixed signals from Democrats have made it easier for Toomey to hound McGinty in the Senate race, where polls have shown the two in a virtual tie. He's also seizing on a national movement within his party: At the Republican National Convention, several speakers—including Trump—referenced US citizens who had been killed by undocumented immigrants.

The conservative momentum against sanctuary cities has been building since a high-profile murder last year in San Francisco, which has long embraced open-immigration policies. In the case, a 32-year-old woman named Kathryn Steinle was fatally shot by an undocumented immigrant who had been convicted of seven felonies and deported five times, according to news reports.

The story of that woman and others like her have become a rallying cry for some Republicans this election cycle. And in Philadelphia, the conviction of an undocumented immigrant accused of raping a 26-year-old doctor in the city's upscale Rittenhouse Square area gained publicity in local media outlets earlier this year.

But even if the Trump-style style approach to policing undocumented immigrants wins over some voters in more rural parts of Pennsylvania, this sort of attitude hasn't gained much traction in Philadelphia, according to Richard Gioioso, an assistant professor of political science at Saint Joseph's University, who told VICE "the local climate is not riled up" and that there's no evidence the sanctuary policy has contributed to additional crime.

"There's no real trend," he said, referring to crimes by undocumented immigrants. "I think that's probably one of the reasons both our city commissioners and the mayor are happy with the sanctuary policy as it stands."