(Bloomberg) -- A caravan of thousands of Hondurans migrants continued its journey northward toward the U.S. this week despite a threat from President Donald Trump to shut his country’s border with Mexico.

Central American migration is being driven by some of the world’s worst gang violence as well as poverty that has been aggravated by extreme weather, defying Trump’s efforts to stem it. Earlier Thursday, Trump said he’d mobilize the U.S. military to close the border with Mexico to stop an “assault” on the nation by a caravan of migrants.

“These countries have the worst rates of violent crime among just about any countries that aren’t in armed conflict,” Adam Isacson, an analyst for the Washington Office on Latin America said in a phone interview. As well as fear of “rampant” gangs, a drought in Guatemala and flooding in Honduras is also causing people to flee, he said.

Migrants who passed through Guatemala City continued their trek Thursday and are set to reach the southern Mexico border in the coming days, ignoring messages from the U.S. to turn around. U.S. Customs and Border Patrol detained 355,106 people at the southern border in fiscal year 2018, up from 303,916 a year ago.

Why U.S. Immigration Overhaul Debate Is So Heated: QuickTake

Local press along the caravan’s path are reporting that thousands of people are still heading north through Central America. An aid worker stationed at the “casa del migrante” encampment in Guatemala City said that 5,000 migrants has arrived in the last two days.

Traveling in large groups provides the migrants with some measure of safety from criminals, and saves them the money they’d otherwise need to pay to smugglers. Mexico is the second-biggest trading partner of the U.S. Any effort to close the border would cause business leaders to “scream,” and would be unlikely to last, Isacson said.

This week, Trump threatened to cut off aid to Central American nations, and then said on Twitter that he would call up the military to close the border if governments in the region didn’t do more to stop the flow of people. During the 2016 election campaign, Trump repeatedly pledged to curb illegal migration and build a wall on the southern border.

Honduras President Juan Orlando Hernandez urged the migrants to return home this week and blamed opposition groups for organizing the caravan. Guatemala President Jimmy Morales rejected U.S. threats to cut aid and said "we will prioritize our laws."

To contact the reporter on this story: Michael McDonald in San Jose, Costa Rica at mmcdonald87@bloomberg.net

To contact the editors responsible for this story: Matthew Bristow at mbristow5@bloomberg.net;Vivianne Rodrigues at vrodrigues3@bloomberg.net

©2018 Bloomberg L.P.