Mexico says it will not grant transit visas or free passage for hundreds of migrants who have left Honduras in an attempt to reach the US border.

The interior ministry said officers would check the status of each migrant and offer them the option of remaining in the country legally.

On Wednesday, Honduran police fired tear gas after people tried to enter Guatemala without going through checks.

Many of the migrants say they are fleeing violence and poverty.

They left San Pedro Sula, one of region’s most violent cities some 40km (25 miles) from the Guatemalan border, on Tuesday. More people joined them as they made their journey on foot and hitchhiking.

The movement is similar to other groups of Central Americans who tried to reach the US in recent years in what has become known as “caravans”. They attracted the ire of President Donald Trump, who has urged countries on their path to do more to stop them.

Mexico’s Interior Minister Olga S├ínchez Cordero said a task force with immigration agents would assist the group and that the country would welcome the people interested in staying there.

“Mexico is not only a transit country… In no way we have transit visas or safe passage,” she told journalists, estimating that some 600 migrants had left Honduras

Earlier, Guatemala’s new President Alejandro Giammattei said Mexico would “do everything in their powers to stop” the group, after a meeting with the Mexican Foreign Minister Marcelo Ebrard. Mr Ebrard has not commented.

Mr Giammattei also said he would respect a deal between Central American countries that allows Hondurans to enter Guatemala as long as they have the required documents.

After entering Guatemala on Wednesday, the migrants split into smaller groups, according to the Associated Press news agency. It reported US Immigration and Customs Enforcement agents were accompanying Guatemalan officials in their checks.

Last year, the countries in the region known as the Northern Triangle – Guatemala, Honduras and El Salvador – signed controversial agreements with the US administration amid President Trump’s efforts to stop people from trying to reach the US through Mexico.

They require migrants to request protection in the first country they enter and allow the US to deport those who fail to do so. So far, the deal with Guatemala – which agreed to it after being threatened with sanctions by President Trump – is the only one that has been put into effect.

A critic of the agreement, Mr Giammattei has not detailed how he will treat it.

The Mexican government has already deployed the National Guard in an attempt to stem the flow of migrants travelling north. Those who manage to get to the border are forced to remain in Mexico while they await court hearings on their asylum requests.

Human rights activist Itsmania Platero told AP: “The truth is, it’s going to be impossible for the [migrants] to reach the US. The Mexican police have a large contingent and they’re going to catch all the migrants without documents and they’ll be detained and returned to their home countries.”

The “caravans” attract migrants who cannot pay for a smuggler and offers relatively greater security than travelling alone or in smaller groups. “Here there’s no work, there’s nothing. That’s why we are fleeing to the US,” a man travelling with his wife and two children told Honduran television.