U.S. District Judge Dolly Gee on Friday ordered the Immigration and Customs Enforcement (ICE) to free migrant children held in the country's three family detention centers for more than 20 days and denounced the prolonged detention of families during the coronavirus pandemic.

According to a report from the Associated Press (AP), the federal judge ruled that the migrant children and their parents should be released from detention by July 17 or sent to live with family sponsors.

This ruling followed after reports of some plaintiffs from a long-running case tested positive for coronavirus, the New York Times reported. Gee wrote in her order that detention centers "are 'on fire' and there is no more time for half measures."

ICE has detained the migrant families at three detention centers in Texas and Pennsylvania last May, as reported by Texas Tribune.

According to the ruling, there were 124 migrant children living in said facilities, which are apart from the U.S. Department of Health and Human Services facilities for unaccompanied children. Some of them have been in the facility since last year.

Gee wrote for "all deliberate speed" in releasing the children, either with their parents or guardians, who are suitable and have been consented to by their parents.

"[ICE needs] to make the sensible choice," Attorney Amy Maldonado, who works with the detained families told AP. "Release the parents to care for their children."

Advocates called for the release of those in family detention centers as the threat of coronavirus remains and is rapidly spreading through immigration detention centers.

Eleven migrant children and their parents have tested positive for the coronavirus disease 2019 (COVID-19) at the Karnes County Residential Center facility.

On the other hand, South Texas Family Residential Center reported at least three individuals, including a two-year-old. Other migrants in the facility are also awaiting the test results after workers from the center tested positive for the coronavirus.

Gee's orders do not apply directly to the parents detained with their children, but most of them refused to have family sponsors for their children upon release.

"Some detained parents facing deportation brought their children to this country to save them from rampant violence in their home countries, and would prefer to see their child released to relatives," said Peter Schey, a lawyer for the detained children.

According to the families' counsel, the agency conducted a "routine parole review consistent with the law" and the order.

While the Centers for Disease Control and Prevention recommended social distancing, the wearing of masks and early medical intervention for those with symptoms, Gee has criticized the Trump administration for inconsistencies in following these recommendations.

Gee's ruling was the first one to mandate a deadline for the release of migrant children in family detention centers. Recent orders required "prompt" release.

ICE said it made efforts to lower the density of populations in the three detention centers and has released over 900 detainees with increased medical risks to mitigate the spread of the coronavirus. In court filings of the agency, ICE noted that it considered most of the people in the detention centers to be flight risks because of pending deportation orders or cases under review.