“We are doing everything we can to simply avoid a tragedy in a C.B.P. facility,” Mr. McAleenan said. “But with these numbers, with the types of illnesses we’re seeing at the border, I fear that it’s just a matter of time.”

In an attempt to ease the problem, Kirstjen Nielsen, the homeland security secretary, signed a compact with officials from the Northern Triangle last week to help curb the complex drivers of irregular migration — including crime and gang violence in the region. Mr. Trump, less than a day later, announced he was ending aid to those countries.

Nonsensically, Mr. Trump has insisted that the real problem is Mexico, which he suggested is doing “nothing” to help stop the tide of migrants. That’s despite the efforts by Mexican leaders to intercept migrant groups, providing temporary visas to asylum seekers and allowing some making the trek north to remain in Mexico while they await court hearings in the United States.

As with the president’s wall, which would do little to discourage unauthorized migration, let alone illegal drug trafficking, no one with a working knowledge of immigration policy believes that closing the border is a solution to the recent surge. The economic disruption for border communities and the impact on trade would be disastrous. Plus, closing the border won’t stop migrants from stepping onto United States soil and claiming asylum, as many of the groups surrendering to border agents in recent months have done in between ports of entry.