Since President Donald Trump's return to the White House, Homeland Security agents have adopted the tactic of waiting outside immigration courts nationwide and arresting migrants as they leave at the end of asylum hearings.
Missing an immigration court hearing is a crime in some cases and can itself make migrants liable to be deported, leaving many with little choice but to attend and face arrest.
US District Judge P. Casey Pitts ruled that the policy violated the Administrative Procedure Act and called it "arbitrary and capricious."
Pitts said that Immigration and Customs Enforcement (ICE) and the Executive Office for Immigration Review (EOIR) "failed to provide reasoned explanations for their actions," adding that their presence in courtrooms had a "'chilling' effect."
James Percival, general counsel at Homeland Security, criticized the ruling, saying that a noncitizen ordered to be deported by an immigration judge should be treated the same as a defendant convicted of a crime.
"A district judge ordering otherwise is naked judicial activism in service of an anti-American, open borders agenda," he said on X.
Trump has tested the limits of executive power to crack down on foreigners without papers, arguing that the United States is being invaded by criminals and other undesirables.