It turns out that everything we’ve heard about the evils of states and localities defying federal law is wrong. So long as a jurisdiction is sticking its thumb in the eye of the federal government on behalf of illegal immigrants who have been arrested and jailed, defiance of federal authority is progressive and commendable.

Through the years, the left has created dozens upon dozens of so-called sanctuary cities devoted to frustrating federal immigration enforcement. On this issue, they are little islands of secession. Somewhere John C. Calhoun must be smiling — although slightly puzzled — over the renewed prestige of a version of his old, discredited idea of nullification.

Sanctuary cities have gotten renewed attention in the wake of a horrific murder in San Francisco, a case amplified by the bullhorn of Donald Trump. Kathryn Steinle, 32, was shot and killed by an illegal immigrant, Juan Francisco Lopez-Sanchez, who had a long rap sheet and had been deported five times. The murder was easily avoidable. A few months prior, the city had arrested Lopez-Sanchez on drug charges, but it simply released him when the charges were dropped, even though Immigration and Customs Enforcement wanted to take custody of him for deportation.

This wasn’t an isolated misjudgment. San Francisco has long been a sanctuary city that doesn’t honor so-called federal detainers (i.e., notices that Immigration and Customs Enforcement wants to take custody of an illegal immigrant upon release from jail). It is a policy of calculated irresponsibility meant to create a zone of lawlessness. In this instance, the human cost was heartbreakingly high.

The immigration debate is famously fraught. Maybe we can’t agree on building a fence. Maybe we can’t agree on a path to citizenship. But surely we can agree that illegal aliens who have landed in jail should be deported?

Apparently not. We have a “broken system,” as the supporters of amnesty always like to say, in part because they took a sledgehammer to the system.

According to Jessica Vaughan, of the Center for Immigration Studies (a group that favors restricted immigration), of some 8,100 deportable aliens released after their arrest by sanctuary jurisdictions from January to August 2014, about 1,900 were arrested again, on 7,500 charges.

The number of sanctuary cities has been increasing during the Obama years. The administration has thrown the book at states that have dared to aid in the enforcement of federal immigration law but hasn’t moved against jurisdictions acting at cross-purposes to the law. Indeed, it has eased the way for them.

It reinterpreted a federal regulation in order to make detainers voluntary. It kneecapped the successful Secure Communities program that shared the fingerprints of local arrestees with the feds, replacing it with a significantly watered-down program.

What to do about sanctuary cities? It is already against federal law for jurisdictions to forbid their officials from sharing immigration information with the feds. Congress should tighten up the law by making it clear again that detainers are mandatory and withholding certain federal funds from jurisdictions that still won’t comply.

Of course, it would take a different president to sign such a bill, one who cares about the laws he is pledged to enforce and who doesn’t seek a sanctuary nation.

Rich Lowry can be reached through comments.lowry@nationalreview.com.