The flyer began circulating on social media in Honduras this month, showing a lone migrant sketched against a bright red backdrop.

It was a call to join a caravan, the work of leftist activists and politicians who had helped lead migrants north in the past.

But they also tossed a political spark into the mix, blaming their right-wing government for the exodus: “The violence and poverty is expelling us.”

They never expected it to ignite an international firestorm.

Far from Honduras, the White House was busy grappling with the killing of Jamal Khashoggi, a columnist whose death inside a Saudi consulate had tarnished Saudi Arabia, a vital ally of the Trump administration. And with the midterm elections in the United States only weeks away, President Donald Trump was eager to change the script.

The caravan gave him a new, politically advantageous story to tell. Stoking American anxieties about immigration had worked well as a cornerstone of his 2016 campaign. The president’s top aides, including Secretary of Homeland Security Kirstjen Nielsen and the White House chief of staff, John Kelly, began briefing the president on the caravan’s progress the week before last, senior White House officials said.

Within days, the president began using Twitter to attack the migrants, putting the blame on Democrats and threatening to cut funding to Central American governments: “We are a great Sovereign Nation. We have Strong Borders and will never accept people coming into our Country illegally!”

What began as a domestic political dispute in Honduras — an effort to undermine newly re-elected President Juan Orlando Hernández and to call attention to the plight of migrants — quickly became an international row, a source of embarrassment in Honduras, consternation across the region and political opportunism in the United States.

Initially planned as a modest caravan of a few hundred people, it grew quickly to about 7,000 as desperation, local media coverage and a swirl of domestic and American politics combined to transform it into the largest movement of migrants north through Mexico in recent history. Even those who helped spur the mass movement never imagined it would expand so much, so fast.

“I never expected this to get so big,” said Bartolo Fuentes, a migrant advocate and former lawmaker who helped promote the caravan, which started 13 October. “Maybe it would come to a thousand people. But this big? No way.”

For leftist politicians like Mr Fuentes and Luis Redondo, a congressman, the caravan offered a perfect way to encourage migrants to travel safely in a large group — and attack the government at the same time.

After Honduras’ divisive presidential election in November, which the Organisation of American States found so problematic that it called for a new vote, people took to the streets in deadly protests against what they saw as a fraudulent vote count.

Despite the controversy, the Trump administration gave its official support to Mr Hernández, a loyal ally who cooperated with Americans during his first term on issues like stopping the flow of drugs and migrants towards the border. With that, Mr Hernández took office, but he remained a polarising figure accused of corruption and amassing too much power.

World news in pictures Show all 50 1 /50 World news in pictures World news in pictures 14 September 2020 Japan's Prime Minister Shinzo Abe, Chief Cabinet Secretary Yoshihide Suga, former Defense Minister Shigeru Ishiba and former Foreign Minister Fumio Kishida celebrate after Suga was elected as new head of the ruling party at the Liberal Democratic Party's leadership election in Tokyo Reuters World news in pictures 13 September 2020 A man stands behind a burning barricade during the fifth straight day of protests against police brutality in Bogota AFP via Getty World news in pictures 12 September 2020 Police officers block and detain protesters during an opposition rally to protest the official presidential election results in Minsk, Belarus. Daily protests calling for the authoritarian president's resignation are now in their second month AP World news in pictures 11 September 2020 Members of 'Omnium Cultural' celebrate the 20th 'Festa per la llibertat' ('Fiesta for the freedom') to mark the Day of Catalonia in Barcelona. Omnion Cultural fights for the independence of Catalonia EPA World news in pictures 10 September 2020 The Moria refugee camp, two days after Greece's biggest migrant camp, was destroyed by fire. Thousands of asylum seekers on the island of Lesbos are now homeless AFP via Getty World news in pictures 9 September 2020 Pope Francis takes off his face mask as he arrives by car to hold a limited public audience at the San Damaso courtyard in The Vatican AFP via Getty World news in pictures 8 September 2020 A home is engulfed in flames during the "Creek Fire" in the Tollhouse area of California AFP via Getty World news in pictures 7 September 2020 A couple take photos along a sea wall of the waves brought by Typhoon Haishen in the eastern port city of Sokcho AFP via Getty World news in pictures 6 September 2020 Novak Djokovic and a tournament official tends to a linesperson who was struck with a ball by Djokovic during his match against Pablo Carreno Busta at the US Open USA Today Sports/Reuters World news in pictures 5 September 2020 Protesters confront police at the Shrine of Remembrance in Melbourne, Australia, during an anti-lockdown rally AFP via Getty World news in pictures 4 September 2020 A woman looks on from a rooftop as rescue workers dig through the rubble of a damaged building in Beirut. A search began for possible survivors after a scanner detected a pulse one month after the mega-blast at the adjacent port AFP via Getty World news in pictures 3 September 2020 A full moon next to the Virgen del Panecillo statue in Quito, Ecuador EPA World news in pictures 2 September 2020 A Palestinian woman reacts as Israeli forces demolish her animal shed near Hebron in the Israeli-occupied West Bank Reuters World news in pictures 1 September 2020 Students protest against presidential elections results in Minsk TUT.BY/AFP via Getty World news in pictures 31 August 2020 The pack rides during the 3rd stage of the Tour de France between Nice and Sisteron AFP via Getty World news in pictures 30 August 2020 Law enforcement officers block a street during a rally of opposition supporters protesting against presidential election results in Minsk, Belarus Reuters World news in pictures 29 August 2020 A woman holding a placard reading "Stop Censorship - Yes to the Freedom of Expression" shouts in a megaphone during a protest against the mandatory wearing of face masks in Paris. Masks, which were already compulsory on public transport, in enclosed public spaces, and outdoors in Paris in certain high-congestion areas around tourist sites, were made mandatory outdoors citywide on August 28 to fight the rising coronavirus infections AFP via Getty World news in pictures 28 August 2020 Japanese Prime Minister Shinzo Abe bows to the national flag at the start of a press conference at the prime minister official residence in Tokyo. Abe announced he will resign over health problems, in a bombshell development that kicks off a leadership contest in the world's third-largest economy AFP via Getty World news in pictures 27 August 2020 Residents take cover behind a tree trunk from rubber bullets fired by South African Police Service (SAPS) in Eldorado Park, near Johannesburg, during a protest by community members after a 16-year old boy was reported dead AFP via Getty World news in pictures 26 August 2020 People scatter rose petals on a statue of Mother Teresa marking her 110th birth anniversary in Ahmedabad AFP via Getty World news in pictures 25 August 2020 An aerial view shows beach-goers standing on salt formations in the Dead Sea near Ein Bokeq, Israel Reuters World news in pictures 24 August 2020 Health workers use a fingertip pulse oximeter and check the body temperature of a fisherwoman inside the Dharavi slum during a door-to-door Covid-19 coronavirus screening in Mumbai AFP via Getty World news in pictures 23 August 2020 People carry an idol of the Hindu god Ganesh, the deity of prosperity, to immerse it off the coast of the Arabian sea during the Ganesh Chaturthi festival in Mumbai, India Reuters World news in pictures 22 August 2020 Firefighters watch as flames from the LNU Lightning Complex fires approach a home in Napa County, California AP World news in pictures 21 August 2020 Members of the Israeli security forces arrest a Palestinian demonstrator during a rally to protest against Israel's plan to annex parts of the occupied West Bank AFP via Getty World news in pictures 20 August 2020 A man pushes his bicycle through a deserted road after prohibitory orders were imposed by district officials for a week to contain the spread of the Covid-19 in Kathmandu AFP via Getty World news in pictures 19 August 2020 A car burns while parked at a residence in Vacaville, California. Dozens of fires are burning out of control throughout Northern California as fire resources are spread thin AFP via Getty World news in pictures 18 August 2020 Students use their mobile phones as flashlights at an anti-government rally at Mahidol University in Nakhon Pathom. Thailand has seen near-daily protests in recent weeks by students demanding the resignation of Prime Minister Prayut Chan-O-Cha AFP via Getty World news in pictures 17 August 2020 Members of the Kayapo tribe block the BR163 highway during a protest outside Novo Progresso in Para state, Brazil. Indigenous protesters blocked a major transamazonian highway to protest against the lack of governmental support during the COVID-19 novel coronavirus pandemic and illegal deforestation in and around their territories AFP via Getty World news in pictures 16 August 2020 Lightning forks over the San Francisco-Oakland Bay Bridge as a storm passes over Oakland AP World news in pictures 15 August 2020 Belarus opposition supporters gather near the Pushkinskaya metro station where Alexander Taraikovsky, a 34-year-old protester died on August 10, during their protest rally in central Minsk AFP via Getty World news in pictures 14 August 2020 AlphaTauri's driver Daniil Kvyat takes part in the second practice session at the Circuit de Catalunya in Montmelo near Barcelona ahead of the Spanish F1 Grand Prix AFP via Getty World news in pictures 13 August 2020 Soldiers of the Brazilian Armed Forces during a disinfection of the Christ The Redeemer statue at the Corcovado mountain prior to the opening of the touristic attraction in Rio AFP via Getty World news in pictures 12 August 2020 Young elephant bulls tussle playfully on World Elephant Day at the Amboseli National Park in Kenya AFP via Getty World news in pictures 11 August 2020 French Prime Minister Jean Castex is helped by a member of staff to put a protective suit on prior to his visit at the CHU hospital in Montpellier AFP via Getty World news in pictures 10 August 2020 Locals harvest their potatoes as Mount Sinabung spews volcanic ash in Karo, North Sumatra province, Indonesia Antara Foto/Reuters World news in pictures 9 August 2020 Doves fly over the Peace Statue at Nagasaki Peace Park during the memorial ceremony held for the 75th anniversary of the atomic bombing EPA World news in pictures 8 August 2020 Anti-government protesters try to remove concrete wall that installed by security forces to prevent protesters reaching the Parliament square, during a protest against the political elites and the government after this week's deadly explosion in Beirut AP World news in pictures 7 August 2020 A protester throws a stone towards Israeli forces in the village of Turmus Aya, north of Ramallah in the occupied West Bank, following a march by Palestinians against the building of Israeli settlements AFP via Getty World news in pictures 6 August 2020 A woman yells as soldiers block a road for French President Emmanuel Macron's visit the Gemmayzeh neighborhood. The area in Beirut suffered extensive damage from the explosion at the seaport AP World news in pictures 5 August 2020 Damage at the site of Tuesday's blast in Beirut's port area, Lebanon Reuters World news in pictures 4 August 2020 A large explosion in the Lebanese capital Beirut. The blast, which rattled entire buildings and broke glass, was felt in several parts of the city AFP via Getty World news in pictures 3 August 2020 A general view shows the new road bridge in Genoa, Italy ahead of its official inauguration, after it was rebuilt following its collapse on August 14, 2018 which killed 43 people Reuters World news in pictures 2 August 2020 Empty stall spaces are seen hours before a citywide curfew is introduced in Melbourne, Australia EPA World news in pictures 1 August 2020 People take part in a demonstration by the initiative "Querdenken-711" with the slogan "the end of the pandemic - the day of freedom" to protest against the current measurements to curb the spread of COVID-19 in Berlin, Germany AFP via Getty World news in pictures 31 July 2020 Pilgrims circumambulating around the Kaaba, the holiest shrine in the Grand mosque in Mecca. Muslim pilgrims converged today on Saudi Arabia's Mount Arafat for the climax of this year's hajj, the smallest in modern times and a sharp contrast to the massive crowds of previous years Saudi Ministry of Media/AFP World news in pictures 30 July 2020 The Mars 2020 Perseverance mission lifts off at the Kennedy Space Centre in Florida. The mission is part of the USA's largest moon to Mars exploration. Nasa will attempt to establish a sustained human presence on and around the moon by 2028 through their Artemis programme EPA World news in pictures 29 July 2020 A woman refreshes herself in a outdoor pool in summer temperatures in Ehingen, Germany dpa via AP World news in pictures 28 July 2020 Malaysia's former prime minister Najib Razak speaks to the media after he was found guilty in his corruption trial in Kuala Lumpur AFP via Getty World news in pictures 27 July 2020 North Korean leader Kim Jong Un poses for a photograph after conferring commemorative pistols to leading commanding officers of the armed forces on the 67th anniversary of the "Day of Victory in the Great Fatherland Liberation War". Which marks the signing of the Korean War armistice KCNA via Reuters

Determined to denounce Mr Hernández’s administration and support the migrants, members of the opposition started promoting the caravan as an example of what happens when a government fails its people. In Tegucigalpa, the capital, a prominent member of the opposition went to the Mexican Embassy and threatened to send out multiple caravans as long as the situation in Honduras remained the same, according to two senior Mexican officials.

“This time it will be so big that when they see everyone walking, they should ask, ‘Where are they coming from and who is responsible for so many people leaving Honduras?’ ” said Mr Redondo in a Facebook post on 5 October in which he shared the caravan poster. “This is a consequence of corruption, lack of security, impunity; those responsible are the corrupt and corrupters of the national party.”

On that score, the government’s opponents were successful. Mr Trump demanded that Mr Hernández stop the caravan, though by then the migrants were already in Guatemala, and it was unclear what Mr Hernández could do. Still, Mr Trump threatened to cut off aid to the country if the caravan was not turned around.

“The United States has strongly informed the President of Honduras that if the large Caravan of people heading to the U.S. is not stopped and brought back to Honduras,” Mr Trump wrote last week. “No more money or aid will be given to Honduras, effective immediately!”

It seemed to panic the Honduran government. In what appeared to be an attempt to deflect responsibility, the Honduran ambassador to the United States, Marlon Tábora Muñoz, sent Florida congressman Matt Gaetz a video in which young men handed out single bills to migrants standing in line.

Mr Muñoz also said that George Soros, US nonprofit groups, or a drug cartel might be helping fund the caravan, said Mr Gaetz, who posted the video to Twitter, adding, “Footage in Honduras giving cash 2 women & children 2 join the caravan & storm the US border @ election time. Soros? US-backed NGOs? Time to investigate the source!”

The claims were later debunked and the video wasn’t even shot in Honduras. It happened in Guatemala. Migrants in the caravan told The New York Times that people who wanted to help them handed out the equivalent of about 13 to 26 cents. The migrants, who have survived on handouts from strangers, said they were not paid to join the caravan.

The ambassador declined to comment. But he was hardly the only person in the Honduran government looking to cast blame for the exodus on foreigners. Earlier this week vice president Mike Pence said that Honduras’ president told him that Venezuela was providing funding to support the migrants, without offering evidence. Mr Hernández’s office did not respond to requests for comment.

The political fallout from the caravan has been disastrous for Honduras. But Republicans welcomed the pivot of Americans’ attention away from the Khashoggi killing to a topic that has long gained traction with Mr Trump’s political base.

Newt Gingrich, the former speaker and an occasional Trump advisor, was among the Republicans following news of the caravan, even as global coverage remained squarely focused on Mr Khashoggi.

Republicans hope that the increased coverage of the migrants would prompt certain voter groups, like white suburban women, to veer away from Democratic candidates, especially if Mr Trump could stoke fears about gangs and drugs, Mr Gingrich said.

“It creates a safety factor” for those voters, he said. “If the first 7,000 to 15,000 get in, what signal does that send?”

Mr Gingrich added: “Trump understands in the current American political structure you have to win polarised campaigns.”

Mr Fuentes and others had aimed to embarrass their government by portraying the caravan as a powerful statement on the cost of failed domestic politics. But they accidentally overshot the mark, precipitating a regional crisis.

The coverage of the migrants and the political blowback — in Honduras and in the United States — has been intense. After following the migrants into Guatemala, Mr Fuentes was detained and sent back to Honduras, where he has stayed away from the spotlight, afraid the government will retaliate against him.

Mr Fuentes said he was opposed to this government and wanted Mr Hernández out of office. But he helped spread the word about the caravan because the road north is dangerous, he said.

“If you leave in a small group, you’re heading for disaster,” Mr Fuentes said, adding that most of the migrants simply joined on their own.

Indeed, if he helped light the match, many others, including Mr Trump and the pro-government news media in Honduras, fanned the flames.

The flyer and private WhatsApp groups that sprung up across the country were most likely the initial sources of information for many who joined the caravan. But interviews with several dozen migrants on the trail credited a pro-government television station with sounding the media megaphone.

The day before the caravan started, a popular program on HCH News dedicated more than an hour to discussing the caravan. The coverage was geared in part towards embarrassing the organisers and spreading disinformation about how Mr Fuentes was paying for the migrants’ food and transportation (an allegation he later denied on the program).

But the effort backfired. Far from delegitimizing the caravan by convincing the public it had political roots, the hosts inadvertently presented many Hondurans who wanted to flee with the perfect opportunity to do so.

Between 200 and 300 people on average leave Honduras every day, risking the journey north in search of a future away from the poverty and violence that make daily life a struggle. Since the last caravan in the spring, a devastating drought has forced even more people to ponder the uncertainty of migrating.

Olvin Alexander Martínez, 21, who worked with his brother and father at a palm oil company in Trujillo, said this year’s yield “was not enough,” costing family members their jobs and him a large part of his salary.

Mr Martinez decided to join the caravan, which now includes Salvadorans, Guatemalans and Mexicans.

Support free-thinking journalism and attend Independent events

Franklin Barahona, 26, a Honduran migrant from La Ceiba, said he joined the caravan at the beginning, then spread the word over WhatsApp and Facebook.

Mr Barahona and his travel companion, Flavio Williams, also 26, had seen news reports that suggested members of the caravan had been paid by Honduran politicians, and that their march was motivated by politics.

“The truth is, it’s false, it’s totally false,” Mr Williams said of the accusations.

“Five thousand, 7,000 people aren’t going to come risk their lives just because of politics, much less their children’s, their wives’ — they’re not going to do it because of politics,” he added.