This July 31, 2014, file photo shows a room inside the Karnes County Residential Center in Karnes City, Texas.
CNN  — 

A federal judge in California granted an extension of this week’s deadline for releasing migrant children from federal family detention, according to a Thursday court filing.

In late June, Judge Dolly M. Gee of the US District Court for the Central District of California called for the swift removal of migrant children who are at one of the three Immigration and Customs Enforcement family detention centers and set the deadline for this Friday.

With that date quickly approaching, the administration – along with the plaintiff’s attorneys – asked for the deadline to be extended to July 27, and Gee agreed.

Families are detained in three facilities run by ICE – Berks in Pennsylvania, South Texas (Dilley) and Karnes County in Texas. Children at the facilities range from 1 year old to 17 years old, according to lawyers and advocates who provide legal assistance.

Gee – who oversees implementation of the Flores Agreement, which governs care of children in custody – said last month that given “non-compliance or spotty compliance with masking and social distancing rules,” it was imperative to transfer children out of the facilities.

The children must be released with their parents or to “available suitable sponsors or other available COVID-free non-congregate settings” with the consent of their parents or guardians, Gee said.

On Monday, a federal judge in Washington, DC, grappled with whether to release families from immigration detention and said a ruling in the case before him would likely not come by Friday.

Immigration advocates and lawyers have expressed concern for months over the potential for spread of the coronavirus given the confined settings at facilities. In a complaint filed to the Department of Homeland Security’s Office of Civil Rights and Civil Liberties, four groups that provide legal services warned of a spike in cases at family detention centers and “lack of appropriate precautions and protocols relating to Covid-19.”

There are 1,110 detainees in ICE custody with positive coronavirus cases who are under isolation or monitoring as of July 15, according to ICE. There are 28 cases in Karnes, one of the family detention centers.

Overall, there have been more than 3,500 confirmed cases in custody.