A federal judge in Los Angeles has ordered the appointment of an independent monitor to force the Trump administration to comply with the minimum safety standards for immigration detention facilities that hold children.

U.S. District Judge Dolly Gee issued the order in response to a class action lawsuit from the Center for Human Rights and Constitutional Law charging the administration with violating the rights of detained migrant children — both those who were taken from their parents under the now-banned separation policy and those who came to the U.S. alone.

The attorneys representing the children provided hundreds of pages of testimony detailing abuse and unsafe conditions they say violates the decades-old Flores consent degree — a settlement setting legal parameters for the treatment of children in immigration detention. The Trump administration’s request a few weeks ago to water down these standards was roundly rejected by Gee, who called it “a cynical attempt…to shift responsibility to the Judiciary for over 20 years of congressional inaction and ill-considered Executive action.”

Since then, a team of about 100 lawyers interviewed more than 200 migrant children and their parents, and submitted to the court reams of testimony describing physical and verbal assault, lack of food and water, sleep deprivation, and dangerously unsanitary conditions. The detainees described being kicked in their sleep, forced to drink toilet water, fed frozen and rotten food, denied medical treatment, and pushed to sign documents they could not read or understand.

The attorneys also say many children have been given psychotropic drugs without parental consent.

Justice Department attorney Sarah Fabian argued unsuccessfully that such a monitor is not necessary, and asked the judge to hold off until the Trump administration can investigate the alleged abuses and rebut them.

Gee did not hold off, and agreed with the plaintiffs on Friday that an outside monitor should be appointed immediately.

“It seems like there continue to be persistent problems,” she said. “I need to appoint an independent monitor to give me an objective viewpoint about what is going on at the facilities.”

Gee’s order came down the same day that ProPublica uncovered numerous police reports documenting sexual assault, violence and other abuses at these shelters, which are currently holding more than 10,000 undocumented children and teenagers and operate with little government oversight.