Mr. McAleenan spoke to reporters the day after Attorney General William P. Barr issued an order to immigration judges that they deny some migrants a chance to post bail. The order, which is expected to be challenged in the courts, could keep thousands more in jail indefinitely while they wait for their asylum requests to be resolved, and appeared to be another effort to discourage migrants from seeking asylum. But it could also add to the overcrowding in detention centers on the border when it goes into effect in 90 days.

For weeks, federal, local and nonprofit officials along the border have been struggling to handle a spike in asylum-seekers from Honduras, Guatemala and El Salvador. Mr. McAleenan, on his first trip to the border as acting homeland security secretary, said the numbers have become unmanageable.

In March, officials encountered or apprehended more than 103,000 migrants, the most in any single month in more than a decade, he said. “Yesterday, in one 24-hour period, we had over 4,800 people cross our border, a new record for the modern era,” Mr. McAleenan said. “Almost 1,000 of them crossed in just three large groups, 375 people in the largest of those groups.”

Over all, the flow of migrants is low compared with the record numbers in the 1990s and early 2000s. But the latest surge has raised a host of legal and logistical challenges. In the Border Patrol’s Rio Grande Valley sector, the number of migrants apprehended so far this month is 8,928, already more than double what it was in April 2018. And in the El Paso sector, the number arriving in April is nearly eight times what it was last April.

The federal government has a history of using temporary emergency housing to deal with influxes of migrants.