But these are complicated plans that would take time to develop. In the short-term, the López Obrador administration, with its local and regional partners in the northwestern border state of Baja California, where Tijuana is located, has to deal with the pressing matter of the caravan migrants.

The first of the caravans set off from Honduras in mid-October and eventually grew to include more than 4,000 people, mainly from Central America, who traveled north by a combination of walking and hitching rides. Many had hurriedly joined the procession, betting that it was the safest and cheapest way to make it to the United States border.

The group’s size provided protection against the criminals that prey on migrants, especially in Mexico. And its profile, which rose considerably when President Trump began railing against the group, elicited an outpouring of humanitarian support along its route.

By the time the caravan had made it to Baja California, other such groups were also heading north through Central America and Mexico. In all, the caravans carried around 8,000 migrants to the border, with most ending up in Tijuana.

Local and state officials, aided by civil society groups, scrambled to accommodate them, opening a temporary migrant shelter in a sports complex that quickly filled beyond double its intended capacity.

While local and state officials openly criticized the federal government for not providing humanitarian assistance and money in the early days of the crisis, the federal migration bureaucracies responded quickly to provide the migrants with speedy access to the Mexican asylum process and other forms of relief.

In recent days, the lines have been long at the temporary center in Tijuana where state and federal agencies have been helping the migrants apply for legal status in Mexico and register for jobs.