Children held with their parents in U.S. immigration detention centers must be released by July 17, a federal judge ruled Friday.

U.S. District Judge Dolly Gee’s order will affect children held for over 20 days at three U.S. Immigration and Customs Enforcement family detention centers in Texas and Pennsylvania. Children will either have to be released with their parents or sent to family sponsors.

The three facilities housed a total of 184 children as of May, ICE said.

The ruling comes after increasing spread of COVID-19 in two of the three facilities.

The detention centers “are ‘on fire’ and there is no more time for half measures,” Gee wrote.

In court filings released Thursday, ICE said 11 children and parents tested positive for COVID-19 at the detention center in Karnes City, Texas. At the nearby Dilley facility, at least three parents and children were quarantined after two private contractors and an ICE official tested positive.

Over 2,500 people in ICE custody have tested positive for COVID-19, and the agency has released at least 900 people who are considered at higher risk should they contract the virus.

Sen. Kamala Harris (D-California) voiced her support for the ruling on Saturday, tweeting that “it should not have taken a court order to release immigrant children in U.S. custody from detention because of COVID-19.”

Sen. Elizabeth Warren (D-Massachusetts) chimed in calling the ruling “a great step forward.”

“They shouldn’t have been locked up in cages in the first place,” she tweeted. “This is a great step forward, but the work is far from over. We must continue to hold ICE accountable for their failure to protect immigrants from COVID-19.”