Donald Trump, the US president, has threatened to close the US-Mexico border and deploy the military unless a large convoy of migrants was stopped.
Mike Pompeo, the secretary of state, is travelling to Mexico City and expected on Friday to meet Mexico’s president, Enrique Pena Nieto, to discuss the situation, as Mexico scrambles to dissuade the migrants from entering its territory.
By Thursday the convoy, which set out from the violent Honduras city of San Pedro Sula on Saturday and is now believed to be around 3,000 people strong, was moving up towards the Guatemala-Mexico border city of Tapachula.
Central Americans have free passage within their region, but crossing into Mexico they are required to present a visa.
Mexico has sent two Boeing 727s carrying federal forces and riot police to Tapachula, in readiness for the caravan’s arrival. Manelich Castilla Craviotto, commissioner of the federal police, said they were sent to guarantee calm and security at the border crossing, and ensure that human rights were respected.
Schools in Tapachula were closed on Thursday and around 200 demonstrators from Pueblo Sin Frontera, which organised a similar caravan in April, took to the streets to demand the United Nations intervene and protect the right to seek asylum.
But both the US and Mexico are working to convince the migrants to turn back.
Mr Trump tweeted: "I must, in the strongest of terms, ask Mexico to stop this onslaught – and if unable to do so I will call up the U.S. Military and CLOSE OUR SOUTHERN BORDER!"
He added that the issue was more important to him than the new trade deal with Mexico, brought in to replace the North American Free Trade Agreement pact.
"The assault on our country at our Southern Border, including the Criminal elements and DRUGS pouring in, is far more important to me, as President, than Trade or the USMCA,” he said.
“Hopefully Mexico will stop this onslaught at their Northern Border."
Earlier in the week Mr Trump threatened to cut off US aid to Honduras, worth $66 million (£50m) for 2019, unless they halted the caravan. By then it was already in Guatemala.
Mexico’s ambassador to Guatemala, Luis Manuel Lopez Moreno, met with leaders of the caravan on Wednesday and warned them that Hondurans caught without papers in Mexico would be deported.
Luis Arreaga, the US ambassador to Guatemala, also posted a video message on Twitter to migrants thinking of entering the United States illegally.
"If you try to enter the United States, you will be detained and deported," he said in Spanish.
"Return to your country. Your attempt to migrate will fail."