In a decision issued this past Friday, a federal judge in the District Court for the Central District of California found that the Department of Homeland Security (DHS) was in violation of a court settlement agreement due to its practice of detaining families who were apprehended as part of the “surge” of asylum-seekers crossing the Southern border since last summer.

The Judge also strongly admonished DHS for the “deplorable” conditions in which the detained families have been held, and ordered that the families be released as soon as possible.

The long-standing court settlement, known as the Flores Agreement, requires that DHS minimize the number of detained immigrant children. Further, when children are detained, Flores requires that they be held in non-secure facilities that are licensed to provide care for dependent children.

The Judge found that the DHS blanket policy of detaining women with children in secured detention facilities which are not licensed to provide any social or foster-care services to children was a clear violation of the “unambiguous” terms of the Flores Agreement.

Further, citing the “widespread and deplorable conditions” that children and their mothers were held in by DHS, the Judge found that DHS had “wholly failed to meet even that minimal standard” of safe and sanitary conditions for those that were detained.

The judge has given DHS one week in which to submit a plan to release the children and their mothers.