Without the active cooperation of communities themselves, police find crimes hard to solve and even harder to prevent within those communities. But where communities are partners in rooting out criminality, the results can be dramatic. The Muslim Public Affairs Council found between September 11, 2001 and June 2012, two out of every five al-Qaeda plots threatening the United States had been foiled or prevented with the help of Muslim communities. Since the December 2009 “underwear bomber” plot, Muslim communities had helped law enforcement prevent half of all al-Qaeda-related terror plots. This makes perfect sense. Those in a given community are in the best position to observe threats from within the community and bring those threats to the attention of law enforcement. If, that is, they feel safe to do so.

Trump’s rant reflects the perverse opposition to comprehensive immigration reform, which mistakes bellicosity for effectiveness. When he announced his campaign, Trump argued that Mexican immigrants bring problems to the United States. “They're bringing drugs. They're bringing crime. They're rapists,” he said. “And some, I assume, are good people.” If that were accurate, then building a bigger, badder fence might be a rational response.

Former Texas Governor Rick Perry distanced himself from Trump’s comments. But by traveling the Mexican border with Sean Hannity on a boat mounted with machine guns, he endorsed that same Manichean logic. Thousands of children were then arriving at the border fleeing violence in Honduras and El Salvador. Children. But even then, many on the right felt threatened, and endorsed greater force and more security as the sole solution.

Today under President Obama the border fence is longer and border patrol agents more numerous than ever before. Obama has also deported more undocumented immigrants than any of his predecessors, of either party. Yet there will always be hardened, determined, criminals who slip through the system. The killer in San Francisco is clearly one such example; deported over and over again during the very years in which border security was repeatedly tightened, he kept finding a way back.

Meanwhile, San Francisco, a “sanctuary city” that tries to protect undocumented immigrants from deportation, may have declined to turn this particular man over to federal immigration authorities, and action that would have prevented his crime. That sort of obstruction would be less likely to happen if the vast majority of immigrants no longer had to worry about deportation. And those immigrants would go from becoming victims of the criminal justice system to its allies, reporting and preventing crimes rather than just cowering in the shadows.

Perhaps the irony in all of this is that if Donald Trump were right, policing and immigration reform would be easy. We’d just round up all the immigrants, ship them away, and crime would disappear. But most immigrants, like most native-born Americans, are simply hardworking people trying to feed their families and help their kids succeed. Targeting them won’t end crime, but it will increase their alienation, making effective crime prevention and policing more difficult. If we could finally pass bipartisan immigration reform including a path to citizenship, then immigrant communities could be part of the solution—helping to build America and keep it safe.

We want to hear what you think about this article. Submit a letter to the editor or write to letters@theatlantic.com.