Still bleary-eyed after a night camped out in a rain-soaked town square, Miriam Carranza combed the knots out of her daughter’s hair and listed the many challenges of life back in Honduras: the low pay and precarious job security at the maquiladora factory; the soaring inflation; the rampant insecurity.

But the final straw came when a local gang demanded payment of a “war tax” that far exceeded the income of Carranza and her construction worker husband.

“They said they would kill one of my daughters if we didn’t pay,” Carranza said as she struggled with seven-year-old Ashley’s unruly locks.

The family fled their home, and rather than risk making the journey north alone, they threw in their lot with the caravan of migrants currently making its way through southern Mexico.

“Honduras just isn’t a country where you can live in peace,” said Carranza.

More than 7,000 people have now joined the caravan, defying threats from Donald Trump and slowly advancing some 45 miles into Mexico since crossing the border from Guatemala at the weekend.

After 10 days on the road, weary members of the caravan – which includes children and seniors as well as several people in wheelchairs – said they would rest on Tuesday in the town of Huixtla, before continuing their journey north.

Inside San Pedro Sula – the most violent city in the world Read more

The migrants’ persistence – and the failure of Mexico and Central American governments to stop them – has enraged Trump, who has described the group as an “onslaught of illegal aliens”, and made the apparently baseless claim that they include “criminals and unknown Middle Easterners”.

But the US president has also made the caravan a central part of his strategy for the US midterms, seizing on the issue as a way to attack the Democrats.

Clean-cut, baby-faced and cradling his six-month-old son, Gerson Martínez, 22, hardly looked the part of an invader. Like many other members of the caravan, he had set out from San Pedro Sula in Honduras, a city with one of the highest murder rates in the world.

Facebook Twitter Pinterest Gerson Martínez and his son Axel, in Tapachula, Mexico. Photograph: David Agren/The Guardian

Unable to find work after losing his job at a maquiladora, or export assembly plant, he was approached by a local gang that pressured him to store weapons in his apartment.

Rather than join the gang, Martínez fled. “If I had joined, my son will have to eventually have to join, too,” he said, as Axel started to cry.

Many of the Honduran migrants describe similar tales of extortion and death threats: reporting such crimes to the police is risky and in a country riddled with corruption and dominated by organised crime, moving to another city is no real solution.

“They gave me 24 hours,” said Aida Acevedo, 26, slicing her finger across her throat as she described how a gang had demanded extortion payments on pain of death. She fled the rugged Olancho region with a vague plan to reach the US and find safety.

“God is the one who will decide if we make it,” she said. “Trump doesn’t have that power.”

Trump and other rightwing US politicians have suggested that the caravan has been funded by “Democrats” or the billionaire financier George Soros. But Acevedo said she was already planning her escape from Honduras when she started seeing mentions of the caravan.

The exodus appears to have grown spontaneously, after a Honduran lawmaker, Bartolo Fuentes, announced on social media that he would be accompanying a group of 160 people who planned to start walking from San Pedro Sula on 12 October.

Fuentes was arrested in Guatemala and deported back to Honduras, where he has since become the target of an online smear campaign, but has always denied organizing the caravan.

Facebook Twitter Pinterest Honduran migrants take part in a caravan heading to the US, in the outskirts of Tapachula, Mexico. Photograph: Johan Ordonez/AFP/Getty Images

Some support has been given by the Mexican NGO Pueblo Sin Fronteras (People Without Borders) which has organised previous – though much smaller – migrant caravans such as one that travelled the length of Mexico in April, and prompted a similar overreaction from Trump.

The group is providing humanitarian and logistical support, but denies having a leadership role.

“There’s not ‘an organiser’.” said Alex Mensing, a projects coordinator with Pueblo Sin Fronteras. “With the Syrian refugees, nobody looks for ‘an organiser’. This is a mass exodus.”

A second caravan from Honduras is also reportedly heading towards Mexico. On Tuesday, Casa del Migrante, a migrant shelter in Guatemala City, said more than 1,000 people had joined the second group which is moving through Guatemala towards the Mexican border.

For many in the caravan, the logic is simple: life at home is increasingly impossible, and travelling alone is too dangerous, especially in Mexico, where criminal gangs target migrants for rape, robbery and extortion.

Central America's rampant violence fuels an invisible refugee crisis Read more

The three countries of Central America’s “Northern Triangle” all face a combination of systematic corruption and violence fuelled by state forces, criminal gangs and the drug trade. Not coincidentally, all three are also still feeling the consequences of US intervention in the region’s 1980s civil wars.

Many Honduran travellers focused their fury not on Trump, but on their own deeply unpopular president, Juan Orlando Hernández, who was re-elected in December in elections plagued with allegations of fraud.

Washington was quick to recognize Hernández’s re-election, just as it supported the government installed in the country’s 2009 military-backed coup.

Facebook Twitter Pinterest Miriam Carranza and her daughter in Tapachula, Mexico. Photograph: David Agren/The Guardian

Trump’s threats to cut aid to Central America made little impact on the marchers. “The US has given money to Honduras – but politicians have spent it on themselves,” said coffee-picker David Hernández as he sipped tamarind juice from a plastic bag.

Like many others, Hernández spoke of a worsening daily grind back home, where bills and taxes have gone up as wages drop. Many companies have started charging for services in US dollars as the local currency, the lempira, plunges.

Meanwhile, the country is struggling to take in a record number of deportees from the US, thanks to Trump’s zero-tolerance immigration policies: more than 35,000 have arrived in the first six months of 2018, a 55% increase from the year before.

Edin Mata, 21, was among them, having been detained in an immigration raid on his employer in Miami.

In Miami, Mata had earned $160 a day working in construction. Back in Honduras, the only work he could find was selling clothes: he barely made $4 a day, and had to give a cut to the gangs.

Removing his camouflage Duck Dynasty cap, he showed a scar on his scalp, left after a gang beating when he failed to make the payment.

“We live like slaves in Honduras,” he said. “I lived so much better in the US.”

Like many of the younger men in the group, Mata entered Mexico by swimming from Guatemala. He said that when he reached the country’s northern frontier he would again swim across the Rio Grande into Texas – a much tougher undertaking, he said, because “the currents are much stronger”.

Such determination has kept the caravan moving northwards, despite Trump’s bluster.

Ordinary Mexicans have pitched in too, passing out sandwiches and water, leaving out new shoes and clothes at the roadside, or giving them lifts a few miles down the road.

Central America's rampant violence fuels an invisible refugee crisis Read more

The caravan has left Mexican politicians in a bind: wary of angering Trump, but unwilling to follow his example – at least in public. Mexican immigration officials routinely detain and deport tens of thousands of Central Americans each year – even as the foreign ministry defends the rights of Mexican migrants living in the United States.

“Violent entry into the country cannot be permitted,” Mexican president Enrique Peña Nieto said in a national address last week. “Mexico remains willing to help the migrants who wish to enter the country respecting our laws.”

President-elect Andrés Manuel López Obrador, who takes office on 1 December, has offered long-term solutions, proposing work visas to Central Americans. But he stopped short of repeating a campaign statement, in which he said Mexico would not “do the dirty work” of foreign governments.

But many Mexicans called on the government to allow the caravan to pass through.

“¡Chingue su madre! Donald Trump!” yelled Marisela Pérez, 27, hurling an insult at the president as she handed out clothes and shoes as the migrants marched north from Tapachula. “Let them in!”