It left the fate of the parents up in the air, however.
The case centers on a 1997 legal settlement — known as the Flores agreement — that set legal requirements for the housing of children seeking asylum or in the country illegally. ee In July 2015, U.S. District Judge Dolly Gee in Los Angeles found the government had violated key provisions of the court settlement that put restrictions on the detention of migrant children.
Department of Homeland Security officials did not immediately respond to a request for comment.
Federal attorneys had argued that the Flores settlement only applied to unaccompanied migrant minors and not children accompanied by parents or other adult family members. Plaintiffs argued the settlement applied to all children.
The 9th Circuit of Appeals panel sided with the plaintiffs.
"This decision makes it clear that the Obama administration can no longer detain accompanied children for long periods of time in unlicensed, locked-down facilities," said Peter Schey, one of the lead plaintiff attorneys and president of the Los Angeles-based nonprofit Center for Human Rights and Constitutional Law.
Schey and Carlos Holguin launched the lawsuit against federal officials and have served as court-appointed lawyers for all immigrant children in federal custody since the 1997 settlement
"I think that this decision greatly strengthens the rights of accompanied children and will hopefully encourage the Obama administration to reconsider its entire family detention policy," Schey said.
The appeals court opinion, however, dismissed Gee's opinion that the accompanying parents or adults of the children may have the right to be released, stating that the Flores settlement only focuses on children.
The opinion leaves questions about what the U.S. will do with the large number of children and parents who crossed the border last year.
It's unclear what the federal government will do next. Federal attorneys could appeal to the U.S. Supreme Court or ask for a rehearing of the case with the full panel of 9th Circuit judges.
For now, federal officials and attorneys on the other side, including Schey, are in settlement talks about children who are detained for days in Border Patrol stations in what legal papers describe as horrible conditions. Children are made to sleep on concrete floors with just a Mylar blanket and no access to clean clothes.
The Obama administration has detained hundreds of parents and children at three detention facilities, two in Texas and one in Pennsylvania. Some are coming up on a year of detention.
Last summer, as an unprecedented number of women and children from Central America were illegally crossing the Southwest Border, Homeland Security Secretary
Johnson said at the time that he wanted to send the message that if people come to the U.S. illegally, they would be detained and then sent home. In addition, individuals held in detention are placed in an accelerated docket in immigration courts and can be removed from the country more quickly.