U.S. Customs and Border Protection (CBP) is required to allow doctors inside child migrant detention facilities thanks to a federal judge’s ruling on Friday (June 28), CNN reports. 

The team of lawyers that exposed dangerous and unsanitary conditions at a detention center housing children in Clint, Texas, filed a motion asking that the Trump administration be held in contempt and ordered to make immediate improvements at subpar CBP facilities in Texas.  

U.S. District Judge Dolly Gee of California’s Central District requested an independent monitor to ensure the government quickly improves conditions at border facilities, particularly as they relate to meeting the medical needs of detained children. According to CNN, the judge set a July 12 deadline for all involved parties to “file a joint status report regarding their mediation efforts and what has been done to address post haste the conditions described.” 

As Colorlines previously reported, the lawyers went public with their disturbing findings after checking on the U.S. government’s adherence to its obligations under the 1997 Flores agreement. The Flores agreement sets government standards for detaining child immigrants and requires officials to promptly release children to parents or legal guardians.

Gee addressed Flores in her Friday ruling: “The Court has already issued several orders that have set forth in detail what it considers to be violations of the Flores agreement,” she wrote. “Thus, the parties need not use divining tools to extrapolate from those orders what does or does not constitute non-compliance. The Court has made that clear beyond peradventure.”

The judge preemptively addressed concerns around the federal government’s capacity to comply with the ruling. “If 22 years has not been sufficient time for defendants to refine that plan in a manner consistent with their ‘concern for the particular vulnerability of minors’ and their obligation to maintain facilities that are consistently ‘safe and sanitary,’ it is imperative that they develop such a comprehensive plan forthwith.”