Federal Judge Sunshine Sykes issued a scathing ruling on Wednesday criticizing how the Trump administration handles detention and release for immigrants facing deportation proceedings, concluding that the government continued a mandatory detention approach in ways the judge said violate the law and due process. Sykes’s order, issued in Riverside, California, directed Homeland Security to take specific steps for many detainees, including notice about potential bond eligibility and near-immediate access to a phone to contact an attorney.

In the decision, Sykes said her findings build on earlier rulings that determined the administration was illegally denying detained immigrants an opportunity for release. She pointed to her own December ruling that concluded the mandatory detention policy was unlawful and extended the reasoning to immigrants nationwide.

Sykes ordered the Department of Homeland Security to provide detained immigrants notice that they may be eligible for bond. The judge also required Homeland Security to provide access to a phone so detainees could call an attorney within an hour, framing the steps as part of ensuring the detainees can exercise due process rights.

The ruling also took aim at the government’s reliance on an earlier immigration court decision. Sykes said she threw out a September ruling that the administration had cited as justification for continuing mandatory detention.

Sykes described the consequences of the administration’s approach in broad terms, saying that failing to provide due process harms detainees’ families and communities and the wider public. The judge cited deaths of Renée Good and Alex Pretti in Minnesota and said the administration had “extended its violence on its own citizens.”

In related remarks reported by the Associated Press, the judge characterized the executive branch’s actions as unlawful and wanton, and said Americans had expressed “deep concerns” over the administration’s behavior. She said that beyond “terror against noncitizens,” the executive branch also killed two U.S. citizens, naming Good and Pretti.

The administration, through a Homeland Security statement referenced in the Associated Press reporting, said the Supreme Court had “repeatedly overruled” lower courts on the mandatory detention issue. The department said it “has the law and the facts on its side” and that it adheres to court decisions until the issue is resolved by the highest court.

The dispute reflects a shift from earlier immigration practices, the Associated Press reported, under which people with no criminal record generally could request bond hearings before immigration judges while their cases progressed—unless they were stopped at the border. The Trump White House reversed that practice, according to the report, prompting immigrants to file separate petitions in federal court seeking release.

The Associated Press said more than 20,000 habeas corpus cases have been filed since Trump’s inauguration, based on federal court records analyzed by the outlet. It also described how judges in some cases granted petitions but later found the administration was violating orders to release people or provide other relief.

The Wednesday ruling followed other recent judicial actions described by the Associated Press. A federal judge in Minnesota held a Trump administration lawyer in contempt after the government failed to comply with an order to return identification documents to an immigrant the judge had ordered released. In New Jersey, another federal judge ordered the administration to explain how it ensures compliance with deadlines for bond hearings in immigration court, saying the government missed court-ordered timelines in 12 of about 550 cases since December 5.

Attorneys representing plaintiffs in the lawsuit before Sykes told the Associated Press they were hopeful Wednesday’s ruling would eliminate mandatory detention without bond hearings. Matt Adams, the attorney for the plaintiffs, said he expected that “in the normal course of things” immigration judges would return to granting bond hearings.