A federal appeals court ruled Wednesday that Homeland Security officials must quickly release immigrant children - but not their parents - from family detention centers after being picked up crossing the border without documentation. The San Francisco-based 9th Circuit US Court of Appeals said that lengthy detentions of migrant children violated a 19-year-old legal settlement ordering their quick release after processing. Government lawyers had argued that the settlement covered only immigrant children who crossed the border unaccompanied by adult relatives. But the three-judge panel ruled that immigration officials aren't required to release the parents detained along with the children, reversing US District Judge Dolly Gee's ruling last year. Advocates seeking stricter immigration controls said they hoped the ruling would discourage adults crossing the border illegally from exploiting children as a way to stay out of custody in the United States. Mark Krikorian, Center for Immigration Studies executive director and an advocate for stricter border controls, said allowing the parents to be released may have encouraged illegal immigration of adults traveling with children. ''It makes using children way less attractive,'' he said of the most recent ruling. The Department of Homeland reported that more than 23,000 families have been apprehended in the first five months of the year compared to about 13,400 in 2015 and around 30,600 in 2014. Most are from Honduras, El Salvador or Guatemala. Melissa Crow, legal director of the American Immigration Council, said she was ''somewhat disappointed'' with the ruling because the goal of the litigation was to shield the children from unfair and inhumane treatment. Separating children and parents still treats the children unfairly. ''The court misses the point,'' Crow said. Since Gee's ruling, immigration officials have released hundreds of families and have been holding newly arriving families for only short durations. Following that earlier ruling, the number of immigrant families has again been on the rise. At issue are two detention centers in Texas that were built after a flood of immigrants in summer 2014 overwhelmed border authorities. The government poured millions of dollars into the two large detention centers after tens of thousands of immigrant families, mostly mothers with children from Central America, crossed the Rio Grande into the US that year. Many have petitioned for asylum after fleeing gang and domestic violence back home. A Homeland Security official told a group of immigration advocates in September 2014 that the jails were opened in part because roughly 70 percent of immigrant families released after being caught at the border didn't report to immigration authorities as ordered. Critics of the jails complained that they were not suited for children and later went to federal court to argue that the government was violating a decades old agreement about how immigrant children would be treated. The Department of Homeland Security didn't return phone and email inquiries over how it planned to proceed. If the government decides to start detaining parents after releasing their children, the children would be treated as unaccompanied minors. That means they would be turned over to the Department of Health and Human Services and placed either with relatives or possibly a foster family in the United States while they wait for DHS or a judge to decide if they will be allowed to stay in the United States. Career law enforcement officials within DHS have long recommended detaining parents if their children must be released to ensure that the adults can be quickly deported, according to a US official briefed on those recommendations. The official said that detaining parents would also likely serve as deterrent to other people considering crossing the border illegally with their children. The official spoke on the condition of anonymity because the person was not authorized to disclose internal government discussions.