Officials in the United States will close four emergency facilities that had been set up to house a record number of migrant children crossing the Mexican border alone, but they warned on Tuesday that minors were still arriving.

The Department of Health and Human Services will close two facilities in Texas and two in California convention centers by early August, Aurora Miranda-Maese, juvenile coordinator for the agency’s office of refugee resettlement, said during a court hearing about migrant children’s custody conditions.

Four of the large-scale shelters will remain open, including one at Fort Bliss Army Base in El Paso, Texas, that has been criticized by immigrant advocates, she said. Others are in Albion, Michigan; Pecos, Texas; and Pomona, California, she added.

Officials in the United States have reported a recent decrease in the number of children held in emergency facilities, including a more than 40% decrease at Fort Bliss since mid-June. According to Miranda-Maese, more children are being released to relatives in the United States or are being sent to state-licensed shelters, which provide a higher standard of care.

The Biden administration established the emergency sites this spring in response to an increase in the number of children arriving alone at the southern border, many of whom were fleeing violence in Central America and hoping to reunite with relatives in the United States. Despite the summer heat, Henry A. Moak Jr., juvenile coordinator for U.S. Customs and Border Protection, said it’s unclear whether that’s about to change.

“It appears that the numbers are still increasing,” he told the court. “I’m not sure if the hot weather will deter them at all.”

The Department of Health and Human Services looks after the children until they can be placed with relatives in the United States. Miranda-Maese stated that the agency has approximately 15,000 children in its care, with fewer than 3,000 in emergency facilities. She did, however, mention that the number of children received from border authorities had increased in the previous week.

“That’s concerning because this is definitely a very difficult and challenging time to be crossing the border,” she said.

Miranda-Maese acknowledged the difficulties at Fort Bliss and stated that the facility was being reconfigured to a more child-friendly pod system with single cots rather than doubles. She also stated that officials are working to improve the system so that relatives can be screened more quickly so that children can live with them.

Her remarks were made during a hearing in a federal court in Los Angeles that oversees a long-standing agreement governing custody conditions for immigrant children.

More than a dozen children described their desperation to get out of the emergency facilities in recent court filings. According to one account, a teenage girl had been at Fort Bliss for nearly 60 days and couldn’t sleep at night because the lights were always on, and she had resorted to eating only popsicles and juice because the food was disgusting.

According to Carlos Holguin, an attorney for the children, advocates are concerned that well-run facilities such as the Long Beach Convention Center will be closed while Fort Bliss will remain open. He also stated that it was unclear which children were sent to state-licensed shelters, which are subject to different regulations, and which were sent to emergency sites.

In July, officials are expected to file updates with the court. An additional hearing is planned for August.