A federal appeals court in California ruled that migrant children detained by U.S. immigration authorities must be provided with edible food, clean water, and basic hygiene items such as soap and toothbrushes, in accordance with a decades-old court order.

The ruling by a three-judge panel of the 9th U.S. Circuit Court of Appeals rejected a Trump administration challenge of a lower court decision finding that the government failed to offer detained minors safe and sanitary conditions as required by the 1997 Flores settlement.

In 2017, U.S. District Judge Dolly Gee found that the government was violating that settlement by not providing safe and sanitary conditions when it held minors in conditions that deprived them of sleep — cold and over-crowded cells – and denied them access to food, water and basic hygiene.

Attorneys for the government had argued that Judge Gee's order modified the original Flores settlement which did not spell out a requirement for specific hygiene items and adequate sleeping accommodations.

The appellate court disagreed.

"Assuring that children eat enough edible food, drink clean water, are housed in hygienic facilities with sanitary bathrooms, have soap and toothpaste, and are not sleep-deprived are without doubt essential to the children's safety," wrote Judge Marsha S. Berzon, a Clinton appointee.

"The district court properly construed the Agreement as requiring such conditions rather than allowing the government to decide whether to provide them," she added.

The Justice Department declined comment.

During a hearing held before the appellate panel in June, an attorney for the government, Sarah Fabian, told a skeptical Judge A. Wallace Tashima that the Customs and Border Protection agency may not be required to provide toothpaste and soap to minors held short-term.

A video of their exchange went viral.

Copyright 2019 NPR. To see more, visit https://www.npr.org.