This is an archived article and the information in the article may be outdated. Please look at the time stamp on the story to see when it was last updated.

A federal judge issued an order Friday blocking the US government from detaining migrant children in hotels, a practice that has been a key part of a secretive new system that immigration advocates had warned was putting kids in danger.

The Department of Homeland Security must stop placing minors in hotels and transfer them to licensed facilities by Sept. 15, Judge Dolly M. Gee said, noting that conditions in hotels “are not adequately safe and do not sufficiently account for the vulnerability of unaccompanied minors in detention.”

Immigration and civil rights groups had said the growing use of hotels to detain children and families during the coronavirus pandemic amounted to a shadow immigration system that skirted the law. They alleged the hotel detentions violated children’s rights under the 1997 Flores settlement, which limits the length of time and conditions under which US officials can detain immigrant children.

Judge Gee’s order applies to unaccompanied minors and children detained with family members. It provides exceptions for children to be detained in hotels for one or two nights while in transit or prior to flights.

The order also requires the federal government to allow independent monitors and lawyers representing detained immigrant children into any facilities where children are being held under new public health restrictions.

“This Court…recognizes that the pandemic may require temporary, emergency modifications to the immigration system to enhance public safety,” Gee said. “But that is no excuse for DHS to skirt the fundamental humanitarian protections that the Flores Agreement guarantees for minors in their custody, especially when there is no persuasive evidence that hoteling is safer than licensed facilities.”

Government attorneys pressed the judge to delay the implementation of her order during Friday’s hearing, arguing that safely transferring children to new facilities would require time and coordination.

An Immigration and Customs Enforcement spokesperson told CNN via email on Friday that the agency is “evaluating the court’s decision but is unable to comment further due to ongoing litigation.”

More than 600 children detained

Recent court documents revealed that more than 25 hotels in three states — Arizona, Texas and Louisiana — were being used to detain immigrant children.

More than 570 unaccompanied minors and more than 80 children traveling with family members have been detained in hotels since officials began invoking a public health law to restrict immigration in March, according to a court-appointed independent monitor’s report. Some children were held in hotels for a few days, others for weeks. Most, according to immigration advocates, were expelled without ever getting a chance to speak with lawyers or a judge.

Immigrant advocates argued that the government contractors tasked with caring for children held in hotels weren’t qualified for the job, and that the hotel detentions shouldn’t be allowed to continue. Instead, they said, children in custody should be transferred to licensed and monitored facilities.

The government argued that the Flores agreement shouldn’t apply to children detained in hotels as a result of public health restrictions issued by the Centers for Disease Control and Prevention.

Government officials have defended the practice of detaining children in hotels, arguing that they were protecting the safety of minors in custody while following new public health guidelines. ICE has said the transportation specialists responsible for caring for children held in hotels were “non-law enforcement staff trained to work with minors.”

Order doesn’t address swift expulsions

Attorneys representing detained migrant children praised the judge’s ruling Friday.

“Children detained by the government have legal protections that can’t be eviscerated by pretending they are not in custody,” said Neha Desai of the National Center for Youth Law. “The court, in its wisdom, saw through this shameful ruse and affirmed that these children are protected by the Flores settlement.”

JudgeGee oversees implementation of the settlement, and her order Friday focuses on how migrant children are treated while detained. But it doesn’t address a larger issue that advocates have also raised concerns about.

As the hotel detentions have gained attention in recent weeks, immigrant rights groups have stressed that the larger issue is that children are being swiftly kicked out of the United States. That legal battle is still being fought.

“We never want children held in hotels in secret without the proper supervision, but the even bigger concern is that they are expelled without hearings,” said attorney Lee Gelernt of the ACLU, who is arguing in a class-action lawsuit that using the public health law to expel children is unconstitutional. The government hasn’t yet responded to that claim in court.