Children had little access to legal services. Instead of several hours of schooling a day, as is offered at licensed shelters for migrant children around the country, children at Tornillo were offered workbooks which they were under no obligation to complete, migrant advocates said.

The Office of Inspector General in November criticized the facility’s failure to conduct F.B.I. fingerprint background checks on staff, and also said it had too few staff members to provide sufficient mental health care.

Eventually, the private nonprofit operating the sprawling desert site informed the government that it did not wish to extend its management contract, setting it up to close.

“This tent city should never have stood in the first place, but it is welcome news that it will be gone,” Will Hurd, the Republican congressman who represents the southwest Texas border region, wrote on Twitter.

The number of migrant children under detention reached record numbers last year, an increase due to both the large numbers of children crossing the border and the roadblocks imposed by the Trump administration to releasing them to family members.

The crunch has eased with the elimination of the policy requiring fingerprints of all adults in any household in which a migrant child is placed. Fingerprints are now only required of the adult who is sponsoring the minor.

As of Jan. 13, about 10,500 migrant minors were held in more than 100 shelters across the country overseen by Health and Human Services, down from about 14,700 in December. Despite the recent decline, the number of children in federal custody remains substantially higher than a year ago, when about 7,550 were staying in shelters.