The records show that the U.S. Department of Health and Human Services had beds available in facilities in several states, including Texas, Arizona, and California. In total, the network on June 17 had 512 open beds in shelters. A few days later, it had 402 shelter beds.
Meanwhile, some 250 infants, children, and teenagers were detained in Clint, Texas, for up to 27 days. Lawyers who visited the facility told The Associated Press they had inadequate food, water and sanitation and at least 15 children had the flu. Some were fed uncooked frozen food or rice and had gone weeks without bathing.
Advocates and experts on the detention of immigrant children said at least some of the unused beds could have gone to children in Border Patrol custody and blamed poor communication between the government agencies for the lapse.
"Five hundred is a big enough number that they should be able to alleviate some of the pressure at the border," said Jennifer Podkul, senior director of policy and advocacy at the group Kids in Need of Defense.
Under federal law, the Department of Health and Human Services is responsible for sheltering migrant children until they are placed with family sponsors.
While complaints have arisen about the treatment of children in the department's custody, its facilities are considered far superior to Border Patrol stations.
The Border Patrol is supposed to hold children in most instances for no longer than 72 hours, after which it's supposed to send the children to Health and Human Services.
HHS' system remains close to full, at around 94% capacity in the most recent records provided to AP.
In a statement, the agency said it was "virtually impossible" for the department to reach 100% capacity because certain beds are set aside for certain age groups or classes of children.
The department is also trying to expand bed space, announcing Wednesday that it was close to opening a facility for up to 1,300 kids in Carrizo Springs, Texas. Workers are preparing the site, which once housed oilfield workers, by removing mold spots and repairing the air conditioning.
The conditions in Clint, first reported last week by The Associated Press, caused mass outrage. By Monday, U.S. Customs and Border Protection said a majority of the children in the facility when lawyers visited had been transferred to HHS. But more than 100 were taken back to the Clint station, CBP said.
Heidi Altman, director of policy at the National Immigrant Justice Center, questioned whether government agencies were sharing information as well as they could.
The gaps between government agencies arose last year when President Donald Trump's administration enacted a zero-tolerance policy that led to thousands of family separations, when agencies lost track of parents and children after separating them and in some cases deporting parents.
"This administration has not chosen to devote time, energy, or resources, to make sure the agencies communicate and share information with each other when it's in the best interest of the children," Altman said. "We have long known that the choice to hold children in deplorable conditions and to delay transfer out of (Border Patrol) processing was never really about the money."
Advocates say children are detained much longer than before in Health and Human Services custody - leading to high capacity numbers and backlogs - due to Trump administration policy.
The agency last year entered an agreement with immigration authorities to share information about sponsors, which advocates warned would discourage adult relatives living in the U.S. illegally from coming forward.
The agency said it has narrowed some of its requirements this year to expedite the release of children.
Last week, it suspended fingerprinting and biometric checks for grandparents, adult siblings, and other close relatives who came forward as sponsors.
It also moved to release children to sponsors before the completion of state welfare checks in cases where there are no specific child welfare concerns.
Copyright 2019 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.