“The current surge was totally predictable and the Trump administration chose not to prepare for it. Instead it launched a raft of harsh deterrence measures that were totally ineffective,” said Wayne Cornelius, a migration scholar at the University of California, San Diego.

He and other critics said the administration had focused on measures to discourage migrants, including restricting their entry at border stations and requiring some asylum applicants to wait in Mexico while their cases are processed, instead of planning humane border reception facilities and working seriously to diminish the violence and poverty in Central America that is driving the migrations.

The influx has stretched every government agency on the front lines, from the Border Patrol, whose agents encounter migrants after they cross, to Immigration and Customs Enforcement, whose officers normally process them for detention or release, as well as the Health and Human Services Department, charged with the care of children who come across the border without families.

In response to the surge, hundreds of agents are being diverted from ports of entry, where they facilitate international trade, to help process migrants. Immigration officers are being redeployed to the border from duties in the interior, and the government is trying to quickly expand capacity at shelters that take in migrant children.

Kirstjen Nielsen, the Department of Homeland Security secretary, said on Friday that the agency is setting up a “crisis-response effort.”

“The system is in free-fall. D.H.S. is doing everything possible to respond to a growing humanitarian catastrophe while also securing our borders, but we have reached peak capacity and are now forced to pull from other missions to respond to the emergency,” she said.