In a 126-page ruling issued just before midnight Friday, U.S. District Court Judge Ketanji Brown Jackson halted the policy shift, declaring that the Trump administration’s decision-making process leading to the change appeared to have violated federal law. She said the decision seemed arbitrary and faulted officials for failing to carry out a formal notice-and-comment practice required for major changes to federal rules.

“Government actors who make policy decisions in their official capacities cannot succumb to whims or passions while rulemaking,” wrote Jackson, an appointee of President Barack Obama. “If a policy decision that an agency makes is of sufficient consequence that it qualifies as an agency rule, then arbitrariness in deciding the contours of that rule—e.g., decision making by Ouija board or dart board, rock/paper/scissors, or even the Magic 8 Ball—simply will not do.”

Immigration officials said the new policy would ease burdens on beleaguered immigration courts and the Justice Department, as well as freeing up bed space in immigration detention centers, but Jackson said she saw no indication that officials considered the potential disruption in the lives of hundreds of thousands of undocumented immigrants and their families.

“There is no evident consideration of the considerable downsides of adopting a policy that, in many respects, could significantly impact people’s everyday lives in many substantial, tangible, and foreseeable ways,” the judge wrote. “An agency cannot consider only the perceived shiny bright spots of a policy that it is mulling—the silver lining, if you will.”

Weekly Shift The latest news in employment, labor and immigration politics and policy. Sign Up Loading By signing up you agree to receive email newsletters or alerts from POLITICO. You can unsubscribe at any time. This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Jackson also repeatedly noted that President Donald Trump issued an executive order calling for expansion of expedited removal more than two and a half years ago, but immigration officials announced no change until July. She said that undercut the notion that there was no time to conduct a public-comment process.

The judge also scoffed at Justice Department arguments that the July memo declaring the new policy was of no direct significance because immigration officials would still have to make case-by-case decisions about who to put into the expedited process.

“The potential benevolence of individual line-agents is cold comfort from the standpoint of those persons who are located far from the border and are now in the agency’s crosshairs, when, prior to the New Designation, they were not,” Jackson wrote.

And despite bitter complaints from Trump, Attorney General Bill Barr and other officials about individual federal judges blocking policies nationwide, Jackson did just that and coupled her decision with a withering attack on the administration’s contention.

“In sum, and sternly put, the argument that an administrative agency should be permitted to side-step the required result of a fair-fought fight about well-established statutory constraints on agency action is a terrible proposal that is patently inconsistent with the dictates of the law,” wrote Jackson.

“Additionally, it reeks of bad faith, demonstrates contempt for the authority that the Constitution’s Framers have vested in the judicial branch, and, ultimately, deprives successful plaintiffs of the full measure of the remedy to which they are entitled,” she added.

White House press secretary Stephanie Grisham said in a statement: "Once again, a single district judge has suspended application of Federal law nationwide—removing whole classes of illegal aliens from legal accountability."

A Justice Dept. spokesperson said in a statement: “Congress expressly authorized the Secretary of Homeland Security to act with dispatch to remove from the country aliens who have no right to be here. The district court’s decision squarely conflicts with that express grant of authority and vastly exceeds the district court’s own authority. This ruling undermines the laws enacted by Congress and the Trump Administration’s careful efforts to implement those laws.”

“The court’s decision to stop the expansion of this process will protect hundreds of thousands of longtime U.S. residents from being deported without a court hearing and prevents the country from becoming a ‘show me your papers’ regime,” said Trina Realmuto of the American Immigration Council.

Jackson’s ruling came on a lawsuit filed in August by the American Civil Liberties Union and the American Immigration Council on behalf of immigrant rights groups Make the Road New York, LUPE, and WeCount.

Ted Hesson contributed to this report.