Among the many counterproductive executive orders that President Trump hastily issued last week was one that threatens to cut off federal funding to so-called sanctuary cities, including places like Boston, New York, Chicago, and San Francisco. These are areas that mostly do not cooperate with federal requests to hand over undocumented immigrants arrested by local police on unrelated charges, or where local police departments do not want to become an immigration enforcement body.

Although not as visibly and overtly discriminatory as Trump’s ban on visa-holders and refugees from certain Muslim countries, his attack on sanctuary cities does not advance or improve policing in the United States. Fortunately, the White House does not actually have the legal authority to halt most of the federal funding to sanctuary cities; and if it tries to, it will find itself fighting difficult legal battles. Moreover, the very thrust of the policy is wrong.

What works and doesn’t

The White House has tried to justify its move with the fallacious claim that sanctuary cities are hotbeds of violent crime. In fact, despite extraordinary criminal violence in Mexico since 2006, which is once again escalating, the U.S. criminal market has remained by and large peaceful. In most of the United States, violent crime rates have been falling for two decades.

Violence from Mexico has not spilled into the United States, even though Mexican drug trafficking groups are the dominant suppliers of illegal drugs in the United States. There are exceptions: in Chicago, for example, criminal violence remains distressingly high for multiple reasons, including the infighting among local Latin- and African-American gangs over local drug distribution markets supplied by the Mexican criminal groups. But there is no evidence that being a sanctuary city causes the intense criminal violence in Chicago, or that undocumented migrants there are the primary source of shootings and homicides. Instead, as the Chicago police department has identified, loose federal gun control policies are a source of the city’s violence problems. That’s not a full and adequate explanation either, though, as other cities face the same—problematic—federal gun laws and yet are safe. While bad gun control policies exacerbate violence, other factors often are crucial drivers.

Reducing homicides and improving policing in Chicago and in other U.S. cities—such as Baltimore and New Orleans, where violent crime has been persistent or rising—is an urgent priority. Chicago has sadly struggled to do so, and President Trump has threatened to send the Feds there, though (once again) not explaining what he means. In fact, various federal law enforcement agencies—including the Department of Justice, the FBI, and the Drug Enforcement Administration—already operate in Chicago, as they do in other U.S. cities.

One effective law enforcement tool that could help reduce violence in Chicago and other U.S. cities are focused deterrence approaches, such as those pioneered in Boston in the early 1990s and successfully adopted in other U.S. cities. They prioritize law enforcement targeting of and social intervention with the groups and actors most likely to initiate violence.

Pushing local police forces to check immigration papers— à la the Arizona SB 1070 regulation, obligating them to prioritize hunting undocumented residents—will ultimately hurt law enforcement. The Bush administration tried that policy: It did not help reduce crime, and local police departments resented it and found it counterproductive, diverting them from other anti-crime priorities and alienating local communities. Communities will shut up and refuse to interact with police forces, the sense of alienation will likely grow, and protests against police can escalate—in the process, vital information on serious organized crime can be lost.

[P]ublic safety requires close cooperation with local communities, not racial or ethnic profiling.

It’s not just a matter of undocumented workers being afraid to cooperate with the police in addressing violent crime; entire communities, including U.S. citizens and legal residents, might turn away from the police. Yet in order to get to know and stop criminals, the police need to know and be accepted by the community.

Don’t shoot yourself in the foot…and the heart

What’s needed isn’t a policy that divides communities and alienates minorities by singling them out or cutting off resources. The bottom line is that public safety requires close cooperation with local communities, not racial or ethnic profiling. Protests by African Americans against excessive and heavy-handed policing should have driven that home to President Trump. Reducing violent crime and gang activity, as Donald Trump also promises, requires reaching out to communities, establishing citizen-police liaison committees, and finding out what crimes actually most threaten local communities—not ostracizing minorities.

Increasing police recruitment from among minority groups, including Hispanic and Muslim communities, is critical. Minority-group officers are often better at understanding diverse communities and developing their trust. If a potential “lone wolf” attack is in the making, for instance, the most important “responders” (and often the only source of intelligence about a pending attack) can be the family, friends, and neighbors of a potential attacker—it’s essential that they feel comfortable approaching the police. Beyond specialized counterterrorism units, such as fusion centers and task forces, it is local communities that have the real on-the-ground intel. Good community-police cooperation is all the more necessary in smaller cities that can’t marshal counterterrorism resources on the scale of New York or Los Angeles.

If Trump and his administration want to “win” at policing, they should focus on fostering cooperation, not banning refugees from particular Muslim countries or threatening to pull funding out from under city governments. Effective policing is about communities feeling protected by, and allied with, the police—not shying away from them.