After the Trump administration issued a January executive order directing local police around the country “to perform the functions of an immigration officer in the interior of the United States,” meaning officers could use traffic stops and ID checks to find and detain undocumented immigrants, Mayor Rahm Emanuel was quick to re-assert Chicago’s “sanctuary city” status.

Chicago, like other major cities and counties, says it won't use official resources to enforce immigration law. The police department is no exception: “[We do] not conduct immigration enforcement and this will not change,” the Chicago Police Department said in a statement to Chicago. “CPD investigates crime, not immigration. CPD officers will never ask about the immigration or naturalization status of residents.”

How long the city can hold out against the executive order remains to be seen—Trump has threatened to strip federal funding from sanctuary cities, though the legality of that remains in question—but experts say that steering clear of immigration issues is in the police department’s best interests.

In a city with one of the largest undocumented populations in the country, the goals of local police departments are often at odds with those of federal immigration authorities, says Richard Wooten, a retired police officer who served in Englewood and the Grand Crossing District. “In local departments we have to build relationships, and we build it on trust. It’s one of the major components we use to solve crimes in the community,” says Wooten. “We’ll never have that kind of relationship if we begin to enforce immigration.”

The U.S. Department of Justice and numerous studies have come to a similar conclusion. The DOJ says that having police do immigration work is “counter-productive,” and studies have shown that it adversely affects trust in communities. A 2013 study by Nik Theodore at the University of Illinois at Chicago found that 44 percent of all Latinos said they were hesitant about calling police, even if victimized, because they feared police could ask about the immigration status of them or their family. The numbers were even higher for undocumented immigrants—70 percent said they would be less likely to call police even if they were victims of a crime, for fear of being deported.

Immigrant communities already hesitate to trust the Chicago Police Department, according a DOJ civil rights investigation released this year, which noted that several different communities are unhappy with CPD’s response to alleged hate-crime incidents and officers' social media comments that Latino and Muslim communities deemed discriminatory.

There’s also the matter of CPD’s recent push to recruit more black and Latino officers. “[Enforcing immigration law] would have a major impact on having qualified people taking the [police] exam,” says Wooten. “They’ll try to avoid becoming police, as well as avoid any interaction whatsoever.”

Though plenty of local officials and activists have spoken out against the most recent executive order, enlisting local police for immigration duties is not new: Until 2012, a program known as 287(g) brought thousands of immigrants into deportation proceedings for misdemeanors as minor as driving through a yellow light. It was partially dismantled by the Obama administration, and it had been accused of terrorizing immigrant communities and making it harder for local police to fight crimes.

Despite the city’s reassurances, activists point out that police haven’t totally separated themselves from federal immigration officials. Organized Communities Against Deportation, an activist group led by undocumented youth, has said it is concerned about an exception in Chicago’s sanctuary ordinance that allows the CPD’s gang database to be used for immigration enforcement.

But President Trump, and Chicago, would do well to be mindful of the story of Sheriff Joe Arpaio in Maricopa County, Arizona. Arpaio prided himself on his use of workplace raids and traffic stops to arrest immigrants, tactics similar to those suggested by the Trump administration. But as the president’s star was rising, Arpaio’s was in a downfall. Maricopa County was slapped with a racial profiling lawsuit and to date has paid out $75 million in the one case alone. He lost reelection following a years-long campaign by immigrant rights groups.

For Wooten, cases like these show why local police shouldn’t get involved in immigration enforcement. “Almost anyone in this country has been a foreigner from some land,” says Wooten. “We should not make immigration a local issue.”