Even though hundreds of children separated from their families after crossing the border have been released under court order, the overall number of detained migrant children has exploded to the highest ever recorded — a significant counternarrative to the Trump administration’s efforts to reduce the number of undocumented families coming to the United States.

Population levels at federally contracted shelters for migrant children have quietly shot up more than fivefold since last summer, according to data obtained by The New York Times, reaching a total of 12,800 this month. There were 2,400 such children in custody in May 2017.

The huge increases, which have placed the federal shelter system near capacity, are due not to an influx of children entering the country, but a reduction in the number being released to live with families and other sponsors, the data collected by the Department of Health and Human Services suggests. Some of those who work in the migrant shelter network say the bottleneck is straining both the children and the system that cares for them.

Most of the children crossed the border alone, without their parents. Many are teenagers from Central America, and they are housed in a system of more than 100 shelters across the United States, with the highest concentration near the southwest border.