SAN PEDRO SULA, Honduras — The flier 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 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 F. 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.

Image

This flier publicized the migrant caravan and was circulated widely on social media.

“I never expected this to get so big,” said Bartolo Fuentes, a migrant advocate and former lawmaker who helped promote the caravan, which started on Oct. 13. "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’s divisive presidential election in November, which the Organization 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 toward the border. With that, Mr. Hernández took office, but he remained a polarizing figure accused of corruption and amassing too much power.

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 Oct. 5 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.

Image

Migrants riding on a trailer on the outskirts of Huixtla.CreditLuis Antonio Rojas for The New York Times

“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 Monday. “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 Representative Matt Gaetz, Republican of Florida, a video in which young men handed out single bills of currency to migrants standing in line.

Mr. Muñoz also said that George Soros, American 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 been surviving 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. On Tuesday, Vice President Mike Pence said that Honduras’s president had 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 adviser, was among the Republicans following news of the caravan, even as global coverage remained squarely focused on Mr. Khashoggi.

Image

El Progreso, Honduras. Between 200 and 300 people on average leave Honduras every day.CreditDaniele Volpe for The New York Times

Republicans hope that the increased coverage of the migrants will prompt certain voter groups, like white suburban women, to veer away from Democratic candidates, especially if Mr. Trump can 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 polarized 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.

Image

Bartolo Fuentes, a migrant advocate and former lawmaker, helped promote the caravan.CreditDaniele Volpe for The New York Times

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

The flier and private WhatsApp groups that sprang 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 toward embarrassing the organizers 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. Martínez decided to join the caravan, which now includes Salvadorans, Guatemalans and Mexicans.

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.