As some 3,000 Hondurans made their way through Guatemala, attention turned to Mexico, after U.S. President Donald Trump threatened Thursday to close the U.S.-Mexico border if authorities there fail to stop them — a nearly unthinkable move that would disrupt hundreds of thousands of legal freight, vehicle and pedestrian crossings each day. With less than three weeks before the Nov. 6 midterm elections, Trump seized on the migrant caravan to make border security a political issue and energize his Republican base. '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!' Trump tweeted, adding that he blamed Democrats for what he called 'weak laws!' The threat followed another one earlier this week to cut off aid to Central American countries if the migrants weren't stopped. Trump made a similar vow over another large migrant caravan in April, but didn't follow through and it largely petered out in Mexico. On Thursday, Mexico's foreign ministry said the government was assisting members of the caravan who had already crossed into Mexican territory. It was explaining the options open to the migrants and helping those who chose to apply for refugee status to navigate the lengthy process. Mexico had also dispatched additional police to its southern border after the Casa del Migrante shelter on the Guatemalan side of the border reported that hundreds of Hondurans had already arrived there. Apparently pleased with that response, in the evening Trump retweeted a BuzzFeed journalist's tweet of a video clip showing the police deployment, adding his own comment: 'Thank you Mexico, we look forward to working with you!' Mexican federal police and immigration officials also appeared to detain immigration activist Irineo Mujica, who led a caravan of migrants through Mexico last spring. His organization Pueblo Sin Fronteras, or People without Borders, said via Twitter that he was arrested Thursday in Ciudad Hidalgo on the Mexico-Guatemala border while participating in a peaceful march. Mexican officials had 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. Marcelo Ebrard, who is set to become foreign relations secretary when President-elect Andres Manuel Lopez Obrador takes office Dec. 1, said Trump's tweets need to be understood in the context of the upcoming U.S. midterm elections. 'The electoral process is very near, so he is making a political calculation,' Ebrard said in an interview with Radio Centro. Trump's stance, he said, was 'what he has always presented,' adding he saw 'nothing surprising in it.' Current Foreign Relations Secretary Luis Videgaray was also sanguine and viewed things through the lens of U.S. politics. 'Nobody likes them (Trump's comments). There's no reason to give them greater transcendence or importance,' Videgaray said from the United Nations where he sought the world body's help processing asylum requests from the migrants. 'What is important to us is the migrants, respect for human rights, their due protection, particularly the most vulnerable.' Still, the idea that Mexico could close its porous southern border — or that the United States would choke off the lucrative trade and other traffic between the two nations — strained the imagination. 'There would be huge economic impacts for both the United States and Mexico ... but limited effect on illegal immigration,' said Andrew Selee, president of the Migration Policy Institute. 'The president certainly can slow down crossing at legal border crossings where about a million people cross each day. That would really hurt legal transit between the two countries and manufacturing and trade, which would affect American workers,' Selee said. 'But it would have much less impact on illegal border crossings between ports of entry.' Stephanie Leutert, director of the Mexico Security Initiative at the University of Texas at Austin, said she interpreted the tweet to mean Trump could send troops not to ports of entry but elsewhere where the illegal crossings take place. 'If that's the case, I don't think Mexico should be too worried because in a sense ... it's the same kind of thing U.S. administrations have been doing for a long time,' Leutert said. Like Guatemala and Honduras, Mexico is a country of many migrants, raising the question of whether the political will exists for a confrontation. Lopez Obrador wants to avoid repression against migrants and also to avoid angering the United States. He said this week that Mexico would offer jobs to Central Americans. 'Anyone who wants to work in our country ... will have a work visa,' he said. Juan Escobar, 24, said he had heard about Trump's comments but said they would not dissuade the migrants from continuing their journey. 'Only God on high can stop us,' Escobar said. Carlos Lopez, 27, said he was concerned by Trump's threats, but 'you have to keep fighting.' Trump also warned that he prioritizes border security over even the recently struck trade deal to replace NAFTA, the United States-Mexico-Canada Agreement, or USMCA. '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. Hopefully Mexico will stop this onslaught at their Northern Border,' Trump tweeted. Analysts didn't see the pact as being in imminent danger, though trade attorney Daniel Ujczo of Dickinson Wright PLLC said there is 'a significant concern' Trump could hold the agreement hostage over future issues. 'Leaders around the world are skeptical that any deal with this U.S. administration is actually final,' Ujczo said. U.S.-bound migrant caravans have been going on for years — with traveling in numbers seen as offering protection from assaults, robberies, even shakedowns by police. They're also a cheaper alternative to the $7,000 to $10,000 that smugglers, charge for passage to the border, Leutert noted. Still, it wasn't until this year that the caravans received widespread attention. 'There have been these caravans through the years, but they become prominent because the president tweets about them,' Selee said. He predicted that, like the caravan in April, Mexico will respond with measures like granting asylum to some migrants who qualify while deporting others who don't, perhaps not eliminating the caravan entirely but significantly reducing its size before it reaches the U.S. border. But the direct, public pressure from Trump puts Mexico, already an uneasy ally the last two years, in an uncomfortable spotlight. 'Ironically, the way President Trump responds to these caravans makes it harder for the Mexican government to cooperate with the U.S. on immigration enforcement,' Selee said. 'There is a lot of disposition in both the current and the incoming Mexican government to cooperate with the U.S. on some aspects of immigration control. But it becomes much harder when President Trump makes this a political issue in which he bashes Mexico.' ___ Orsi and Stevenson reported from Mexico City. Associated Press writer Paul Wiseman in Washington contributed to this report.