Gee based her ruling on a 1997 class-action settlement that said juveniles under the age of 18 can't be held for more than 72 hours and that DHS was in violation of this settlement.
If a parent was caught with his or her child, authorities could justify keeping the adult in custody if the person is a “significant flight risk” or poses a safety concern, the ruling said.
The ruling was seen as a defeat for U.S. immigration authorities, who in court filings argued releasing undocumented immigrant children encourages families in Central America to undertake the dangerous journey north.
U.S. officials are holding 1,400 parents and children at three centers, according to the Los Angeles Times.
Gee called conditions a the family detention centers – two in Texas, one in Pennsylvania – “deplorable” and said in some cases children were kept in crowded rooms for days without places to sleep.
The government said last month it was “disappointed” with the decision and was efforting to move children and their mothers through family immigration detention centers as quickly as possible.
The government is expected to appeal Friday’s ruling. The agency could not be immediately reached for comment.