Guatemala's new president on Wednesday faced an early test of his ability to manage migration as a caravan of hundreds of people left Honduras for the United States.

President Alejandro Giammattei inherited a contentious deal that his predecessor's government struck with Washington designed to make migrants from Honduras and El Salvador seek asylum in Guatemala rather than the US.

More:

Giammattei met with Mexican Foreign Minister Marcelo Ebrard early on Wednesday, and later told reporters that Mexico was determined to halt the caravan's advance.

"The Mexican government told us that they won't let it pass," said Giammattei, "that they will do everything in their powers to stop it from passing."

Mexico's foreign ministry did not immediately respond to a request for comment on Giammattei's remarks.

Earlier, Ebrard said on Twitter that Mexico and Guatemala will hold bilateral talks on migration once the new Guatemalan government has become familiar with "the situation".

Honduran migrants praying before heading towards the US as part of a new migrant caravan, in San Pedro Sula, Honduras [Reuters]

In accordance with a freedom of movement agreement between northern Central America countries, Giammattei said he would allow the caravan to enter Guatemala provided its members had the required paperwork.

Still, tensions flared when a group of about 300 migrants approached the Guatemala border at Corinto from Honduras.

According to Honduran security ministry spokesman Jair Meza, Honduran police fired tear gas when a group of people tried to cross without passing through migration controls.

Some reached the Guatemalan side, where 15 people were detained by Guatemalan authorities and sent back, Meza said.

Giammattei, a conservative who has already discussed migration with top US officials, is scheduled to speak by phone with his US counterpart Donald Trump on Wednesday.

Giammattei has yet to detail how he will treat the US migration agreement, instead focusing on economic development.

"Physical walls aren't going to stop migration ... the only things that stop migration are walls of prosperity," Giammattei told Mexican broadcaster Televisa.

Before dawn, the caravan of several hundred people set off from San Pedro Sula in northern Honduras, about 40km (25 miles) from the Guatemala border.

"Here, there's no work; there's nothing. That's why we are fleeing to the United States," a young man travelling with his wife and two children told Honduran television.

San Pedro Sula, one of Central America's most violent cities, also was the departure point for a large caravan in 2018 that angered Trump, prompting him to press governments in the region to do more to contain migration.

Guatemala's former President Jimmy Morales last July agreed with the US government to implement measures aimed at reducing US asylum claims from migrants fleeing Honduras and El Salvador, averting Trump's threat of economic sanctions.

Giammattei said a top priority would be reviewing the text of migration agreements made with the US.