A federal judge ordered that children held in family detention centers be released amid the spread of the coronavirus. In fact, Judge Dolly Gee of the U.S. District Court for the Central District of California reportedly criticized the Trump administration for allowing prolonged detentions during the pandemic.

Gee’s order applies to children who have been held at three ICE-operated family detention centers in Texas and Pennsylvania. Most children have been held for more than 20 days, with some having been detained since last year. Gee ordered that children be released to their parents, a family sponsor or a COVID-free group home with the consent of their parents by July 17.

It’s the first time that a court has set a deadline for children’s release from detention centers, Vox reports. The order also states that ICE can use location monitoring devices on those who are released if it’s deemed necessary, though it does not detail what could make it so.

The order also states the court is “not surprised” that the coronavirus is present in these centers as “individuals living in congregate settings are more vulnerable to the virus.”

Gee’s order said ICE was detaining 124 children at its centers, which are separate from the U.S. Department of Health and Human Services facilities for unaccompanied children that were holding around 1,000 children in early June, the Associated Press reports. The numbers in both systems have fallen significantly since earlier in the Trump administration because of the Remain in Mexico policy or because they’re stopped while trying to cross.

Eleven children and parents have tested positive for COVID-19 at the family detention center in Karnes City, Texas, ICE said according to court filings. More than 2,500 people in ICE custody have tested positive for COVID-19 with ICE saying it had released at least 900 people considered to be at risk.

“The [family residential centers] are ‘on fire’,” Gee wrote. “There is no more time for half measures.”