States and cities are taking immigration reform into their own hands. With prospects for comprehensive legislation bleak in Washington, local governments have begun making decisions about who gets deported and who doesn’t by refusing to participate in a system that has come to rely on them. After a few years of slow but steady progress, local reform is now taking off.

In the last three weeks, Philadelphia, Baltimore, Denver, and counties in Oregon, Colorado, Washington, and California have announced they will no longer help federal immigration police carry out deportations. These decisions, spurred by recent federal-court rulings, add to the growing chorus of state and local governments that have recently backed away from the deportation system: dozens of major cities and counties, two states, and counting.

This movement is a big deal, because local jails have become the frontline for immigration enforcement during the Obama Administration. As the wait for administrative action from the White House continues, local resistance is already stopping thousands of deportations every month. Even if Congress is able to pass a comprehensive reform bill, the current wave of local policy changes and judicial decisions will have altered the structure of immigration enforcement by making it much harder for federal officials to rely on local police and sheriffs. National reform is still crucial. But once you understand the depths of federal-local collaboration—and the recent pattern of resistance—it’s clear that the backbone of the immigration-enforcement dragnet is starting to weaken. Pushback is coming from places with some of the largest undocumented populations, and yet many outside the immigration policy world have overlooked it.

Immigration and Customs Enforcement (ICE) leans heavily on local law enforcement to help identify and arrest deportable immigrants. Every day, ICE sends local jails across the country thousands of “detainers,” which are requests to hold people after they’ve bailed out, been acquitted, or served their sentences, to give ICE time to pick them up. The agency also uses local jails to identify potential candidates for deportation. Through a program called Secure Communities, jails send fingerprints to ICE after every arrest nationwide, which led the agency to identify more than 1.5 million people between 2009 and 2013. Less well known but perhaps more consequential is the Criminal Alien Program (CAP), in which ICE agents interrogate foreign-born inmates in local jails. Between 2007 and 2011, CAP facilitated 2.5 million such interrogations. If either Secure Communities or CAP leads ICE to think a person could be deported, the agency issues a detainer to facilitate their arrest.

These federal-local programs have been crucial to the sharp rise in deportations in recent years. Federal agents can’t police every corner of the country, but local law enforcement can. (One supportive scholar calls local police a “massive force multiplier.”) The impact has been powerful. The Obama Administration is on pace to deport more immigrants than any before it. (Recent statistical quibbling should not obscure that fact. While removal orders through immigration courts are down, that’s largely because of new strategies to deport people without a hearing before an immigration judge.) More than 300,000 of the 2 million people deported under Obama were identified through Secure Communities, a number that doesn’t even account for CAP.

The governments that are now refusing detainer requests have identified a number of problems with participating in immigration enforcement. For one, deportations in recent years have expanded in arbitrary ways. ICE has used local governments to help deport record numbers of immigrants with no criminal records or only extremely minor offenses, despite professing an intention to devote its limited resources to violent criminals and other public-safety threats. Many of these deportees have U.S. citizen children and would have a path to legal status under a bill the President supports. Relying on jails might seem to zero in on “criminals,” but in practice, that has largely not been the result. In racing to meet its apparent 400,000-per-year target, ICE has swept up any and all who come into contact with the criminal-justice system, including victims, witnesses, and others who should not have been arrested in the first place. There is also evidence that connecting immigration consequences to normal law enforcement encourages racial profiling.

Another consequence of local collaboration has been to effectively remove police protection from many immigrant communities: Crime victims don’t call the police when local officers carry the banner of immigration enforcement. Anyone who is fingerprinted can end up on ICE’s radar through Secure Communities, and every foreign-born person who enters a jail can be interrogated through CAP. Domestic-violence victims, who are often erroneously arrested alongside the perpetrator, have been particularly vulnerable. As many law-enforcement officials have now pointed out, the public-safety consequences can be dire.

Local governments themselves suffer too. Holding people in jail is expensive, and the federal government asks many jails to hold thousands of people per year without reimbursement. Localities have also faced lawsuits that create serious financial liability when ICE makes the mistake of issuing an immigration hold against a U.S. citizen, a problem that is surprisingly common. When Santa Clara County, California, asked ICE in 2009 for reimbursement and indemnification, ICE turned a cold shoulder. This sort of behavior has not made the agency many friends in local governments, even as they have complied with its requests out of fear of repercussion.

Federal courts have started to voice their own concerns. In March, the first appeals court to squarely address the issue held that immigration detainers were purely voluntary, confirming that local jails could choose which to grant and which to decline. (Legal scholars and state attorneys general already considered that to be clear from constitutional principles that prohibit the federal government from demanding help from local law enforcement. The language of the detainer form, however, combined with ICE’s carefully curated silence on the matter, led some sheriffs to incorrectly believe that detainers were mandatory.) The ruling meant that local governments could be financially liable for holding people on ICE detainers in violation of their constitutional rights. Another blow came three weeks ago, when a district court in Oregon held that a local jail had violated the Fourth Amendment by granting a detainer request without probable cause or judicial authorization. These decisions have opened the possibility of lawsuits every time a jail holds a person for ICE, regardless of the person’s citizenship or immigration status.

Citing the Oregon decision, three Portland counties—Multnomah, Clackamas, and Washington—immediately announced they would refuse all detainer requests from ICE. On the same day, the mayor of Philadelphia signed an executive order that refuses all compliance with detainers unless supported by a judicial warrant. The next day, the governor of Maryland declared the same for the Baltimore jail. In the last three weeks, dozens more counties in Oregon, Washington, California, and Colorado announced they were also backing out because of the constitutional concerns raised by the Oregon court. In a press release, the president of the Oregon State Sheriff’s Association said, “We will no longer violate anybody’s constitutional rights, I can guarantee that.”

This adds to a growing chorus of big cities and counties that have refused to take part in immigration enforcement. The movement started in 2011, when the first policies were enacted in Cook County, Illinois, and Santa Clara County. New York, Washington, D.C., and others soon followed suit. Late last year, Miami and New Orleans enacted policies to limit their compliance; advocates in Austin have pushed for a similar approach.

The growing wave of resistance reached a new scale in January when the first statewide laws limiting cooperation with ICE went into effect. As of January 1, jails in California and Connecticut are no longer allowed to honor ICE detainers unless the person has certain convictions or serious criminal charges. This means the agency can no longer use local law enforcement to round up those with little or no criminal record. In California, where the law is called the TRUST Act, the effect has already been dramatic. Sheriffs across the state are rejecting about two-thirds of ICE detainers based on the new law, which means it has already kept hundreds, if not thousands, out of deportation proceedings. A similar law is working its way through the legislature in Massachusetts and recently passed out of committee. In Maryland, the governor sent ICE an angry letter asking why it has targeted so many immigrants without criminal records in his state; advocates there have begun pushing for a TRUST Act of their own. Legislators in Arizona introduced a similar bill in March.

This is the first time in recent memory that state and local governments have so directly influenced federal immigration outcomes, but it’s certainly not the first time they have tried. Attempts by states like Arizona and Alabama to get more involved in immigration enforcement have been largely undone in the courts. So, too, have initiatives to make life so hard on migrants that they would get up and leave on their own. States and cities have only retained control over certain aspects of integration, like driver’s licenses and some parts of the social safety net. What’s different this time is that state and local governments are exerting real power over the ultimate immigration question: who gets deported and who gets to stay. It is a contingent power, because only the federal government can determine which immigrants have the legal right to stay; but, on the ground, to reject an immigration detainer is often to prevent a deportation. The shift is too new to have shown up yet in headline data, but the structure of immigration enforcement is changing.

It will have lasting consequences. Federal reliance on local jails is not going to disappear any time soon: Near-term executive action will not end it, and long-term legislative reform may even expand it, judging by the enforcement measures Republicans are likely to demand in exchange for a legalization program. And while ICE has other methods at its disposal, such as raids of business and homes, they are more costly than issuing detainers and have gotten the agency into trouble in the past. One way or another, local collaboration—and the deportation policy it has facilitated—is waning. As momentum builds, more state and local governments are going to realize that detainers are both expensive and optional, and more immigrants and their communities are going to realize they have a local venue to voice their grievances. Federal authorities will then be forced back into making hard decisions about immigration enforcement on their own.