A judge on Tuesday barred the federal government from making arrests at immigration courts, ordering an end to a practice that took hold shortly after President Donald Trump took office last year.

The Trump administration's reversal of long-standing policy against arrests at immigration court resulted "not from merely unreasoned decision-making but a complete lack of decision-making," wrote U.S. District Judge Casey Pitts of San Francisco.

Authorities failed to address the "chilling effect" of arrests on whether people attend court hearings.