One of the broadest efforts to block Secure Communities came from California, where state lawmakers in 2013 passed the Trust Act. That law barred local authorities from detaining someone for ICE for more than about 48 hours and only in cases when someone was accused or convicted of a serious crime. The state has since passed an even more restrictive law, greatly limiting when and how local authorities can assist immigration agents.

By 2014 the Obama administration abandoned Secure Communities altogether, replacing it with the Priority Enforcement Program, or PEP, which was intended to focus ICE resources on only the most serious criminal cases and those people who were considered a threat to national security.

Mr. Trump’s pledge to step up removals was complicated after he took office in 2017 by the legacy of Secure Communities, as well as a wave of resistance from religious groups, neighborhoods and activists against ICE efforts.

Many local agencies ended cooperation with ICE, either proactively or under pressure from immigrant rights advocates.