The migrants, mostly young men, say they are trying to escape poverty made worse by the coronavirus pandemic. Mexico believes their arrival is linked to the upcoming US elections.
Mexico deployed its military along the southern border on Friday to block a migrant caravan.
The caravan consists of thousands of migrants of Honduran origin, trying to travel through Guatemala and Mexico to reach the United States.
"They're not going to cross," Francisco Garduno, the head of the Mexican migration authority, told reporters, adding that the migrants must "respect the immigration law."
The government said that hundreds of military and immigration personnel will be deployed to the border.
Mexico believes the arrival of the migrant caravan is linked to the US elections. Immigration is one of the key issues in the November 3 vote.
"It seems very strange to us. It's very strange that this caravan leaves on the eve of the election in the United States," said Mexican President Andres Manuel Lopez Obrador.
US President Donald Trump, who is seeking a second term, has threatened Mexico with a rise in trade tariffs if it does not do more to control the influx of undocumented migrants to the US.
Mexican President Obrador said he has made efforts to ensure Mexico does not become embroiled in the election campaign and the battle for the White House.
The migrants mostly consisted of young men. Some of them wearing masks, said they were trying to escape poverty aggravated by the coronavirus pandemic.
Some returned to their country after Guatemalan forces ordered them to be detained and deported. Mexico said it will deploy hundreds of military and immigration personnel to prevent their entry into the country.
Mexican immigration authorities said they will not be allowed to pass.
tg/aw (AFP, Reuters)