THOUSANDS of migrants who were travelling in a caravan toward a border crossing on the Mexico-Guatemala frontier have turned around.

They stopped about two blocks from the crossing before heading back, saying they would wait another hour or so. Some of them talked among themselves.

What stopped them? The border post is guarded by a heavy security force and tall metal gates.

Dozens of Mexican federal police officers are on the border bridge, with hundreds more behind them.

Guatemala has closed its border gate and is standing guard with dozens of troops and two armoured jeeps.

Mexico’s ambassador to Guatemala says his country has decided to enforce a policy of “metered entry” since thousands of migrants are clamouring to cross. The migrants hope to enter Mexico and cross the country to reach the United States.

Jose Porfirio Orellana is a 47-year-old acorn and bean farmer from Yoro province in Honduras.

Orellana says “the economy in Honduras is terrible, there is nothing there.”

The caravan, which is 3000-strong, made a valleylike formation, with men walking to the sides and women and children walking in the middle.

The exhausted travellers are mostly from Honduras, but migrants from other Central American countries have joined the caravan.

Jonathan Guzman, a 22-year-old from El Salvador, said he had dreams of working in construction in Los Angeles.

“It’s the third time that I’m trying to cross,” he said.

As the sun rose, a military helicopter could be seen overhead, foreshadowing the difficulties that the migrants will have as they try to reach the US.

The US-bound caravan massed in a Guatemalan border town and prepared to begin crossing the muddy Suchiate River to Mexico on Friday, despite US president Donald Trump’s threats of retaliation.

Mr Trump has made it clear to Mexico that he is monitoring its response.

Early on Thursday, he threatened to close the US border if Mexico let the migrants advance. Later, he retweeted a video of Mexican federal police arriving at the Guatemalan border and wrote: “Thank you Mexico, we look forward to working with you!”

Edgar Corzo of Mexico’s National Human Rights Commission expressed concern about the police deployment in Ciudad Hidalgo.

“We hope that the immigration officials and federal police have a humanitarian understanding,” Corzo said. He said they were “worried that things could escape rational margins.”

Mexico’s southern border is notoriously porous and it was unclear how many of the migrants would attempt to cross legally at the bridge.

Mexico has said the Hondurans would not be allowed to enter as a group and would either have to show a passport and visa — something few have — or apply individually for refugee status, a process that can mean waiting for up to 90 days for approval. They also said migrants caught without papers would be deported.

In April, Mexican immigration officials had some success in dispersing the smaller caravan by processing many who decided to seek refugee status in Mexico, but some did continue on to the US border where they were processed over several days.

Three weeks before US midterm elections, Mr Trump has seized on the caravan as a political winner for Republicans.

Early on Thursday 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 called on Mexico to ensure the migrants (and what he said were the “many criminals” among them) do not reach the US border while threatening Guatemala, Honduras and El Salvador with financial penalties.