MAPASTEPEC, Mexico — Like so many others in his impoverished part of southern Mexico, Joaquín Ramírez, a corn farmer, eagerly cast his vote in the presidential election last year for Andrés Manuel López Obrador.
But less than five months into Mr. López Obrador’s term, Mr. Ramírez’s view of the president has begun to sour.
The reason, he said, is evident in the tens of thousands of migrants from Central America and elsewhere who have stopped in his small town in recent months en route to the United States border, taxing government resources and the patience of residents.
Mr. Ramírez blames the influx on the president’s migrant-friendly messaging and policies.
“By trying to do good, he has done a lot of bad,” Mr. Ramírez said in the main square in the town of Mapastepec. “It seems like he is more worried about them than about his own people.”
The resentment is heated enough that local officials in the nearby town of Huixtla tried to block about 2,000 migrants from entering town in recent days, declaring an emergency and telling residents to close their shops and remain inside their homes.
The towns here in the southern Mexican state of Chiapas have long been a common stop on the migratory route for people heading north. But something began to change last October with the arrival of thousands of migrants traveling en masse, in what has become known as a caravan.
At the time, Mapastepec laid out the welcome mat, with the local authorities deploying every member of the town’s staff — about 300 people — to help feed and care for the migrants, who slept in the main square, on surrounding sidewalks and in five temporary shelters.
Since then, however, a steady stream of large migrant caravans has passed through the area, and the town’s patience has worn thin.
Some residents claim the caravans have brought an increase in crime. Several confrontations between migrants and government officials in Chiapas, like the attempt to block migrants from entering the town of Huixtla, have also spurred concern.
But as the caravans have led to a certain migrant fatigue along the migrant trail in Chiapas, some residents are beginning to feel an even deeper antipathy toward Mr. López Obrador.
This sentiment has been particularly abundant in recent days, with more than 8,000 migrants passing through the state, most of them fleeing poverty and violence in Central America. Many, if not most, intend to head to the northern Mexico border, where local officials and community groups are grappling with a backup of asylum-seekers waiting to apply for sanctuary in the United States.
In Mapastepec on Friday, at least 1,000 migrants were packed into a recreation complex that had been converted into a temporary shelter. Hundreds more were languishing on sidewalks around town, and thousands more were en route from the south.
Ervin La Parra, a machinist from Huixtla, argued that Mr. López Obrador and his administration have shown no willingness to plug the porous southern border.
“I just don’t understand why they are still letting so many people just come in like that,” he groused. “His reasons remain a mystery to me.”
Yet on Friday afternoon, Mexico’s federal police, working alongside immigration officials, detained hundreds of immigrants from Central America who were bathing in a river on the outskirts of Mapastepec, according to local news reports. It remained unclear why that group of migrants had been singled out for enforcement.
The migrants and their advocates say that the Mexican government’s inconsistent migration policies have contributed to the disarray and confusion in southern Mexico.
“The lack of information is driving people to the limit of desperation,” a coalition of human rights and aid organizations said in a statement this week. The group described the situation unfolding in southern Mexico as “a humanitarian crisis.”
The López Obrador administration has been under extraordinary pressure from the Trump administration to stem the flow of migrants heading north. Mr. Trump has threatened to close the southwest border of the United States unless Mexican officials step up their immigration enforcement efforts.
That challenge has tested Mr. Lopez Obrador’s stated goal of presenting a softer, more-welcoming face toward migrants.
He took office in December promising to break from what he called his predecessors’ enforcement-first approach to managing migration. Detentions and deportations by the Mexican authorities plummeted during Mr. Lopez Obrador’s first three months in office, even as the flow of migrants from Central America and elsewhere surged.
His administration has also largely accommodated the caravans, allowing undocumented migrants traveling en masse to move through Mexico essentially unfettered.
In January, his administration even invited Central American migrants to apply for a special yearlong humanitarian visa that allows them to work anywhere in Mexico, and it set up a special task force on the southern border to expedite those visas, calling it a permanent policy.
But after more than 13,000 migrants applied for the visa in only two weeks, the policy was suspended.
A promise to start issuing the visas again nearly three weeks ago was abruptly rescinded this week. Instead, the authorities said they would issue only temporary regional visas that restrict migrants to the south of the country, thereby keeping them from traveling legally to the American border.
The Mexican government did not explain the change in strategy. But the shift has further added to confusion among migrants.
The Mexican authorities also appear to be ramping up enforcement efforts under pressure from the Trump administration. Mexican officials have said they are deploying a cordon of security forces across southern Mexico to help control illegal migration.
Kelvin López, 23, a Honduran migrant traveling with his wife and their young son, said the family had fled the violence-plagued city of San Pedro Sula, Honduras, several weeks ago, hoping to get a humanitarian visa in Mexico.
“When we arrived we were told the government was not giving those visas anymore, and so we have decided to move and head north without any permit, risking everything and enduring hunger and insecurity,” he said as he walked along a highway from Huixtla to Mapastepec.
This week, Mexico’s National Human Rights Commission criticized the López Obrador administration for taking so long to process migrants’ applications for visas and travel documents, delays that have contributed to overcrowding in government-run migrant shelters.
In Mapastepec, the commission said, government officials told migrants waiting for migration documents last week that they may have to wait as many as six months for their paperwork to be completed, setting off “a violent protest” that was subdued only when the police intervened.
Ramón Alfredo Nolasco, a Honduran migrant, said he thinks migrants “have been fooled” by the government.
“They keep telling us it’s coming tomorrow and the day after, and nothing happens,” said Mr. Nolasco, who has been waiting for a work visa for more than a month. “We just want to get out of here, but they told us we would be detained if we leave.”
The disturbances in the Mapastepec migrant camp have added to a growing wariness among residents here and in other towns in Chiapas that have served as waystations for the caravans in recent months.
“Not all of them are here wanting better opportunities or work,” said Dora Luz García Cruz, a food vendor in Mapastepec. “We are constantly afraid there is going to be a brawl or clashes with the police.”
When municipal officials in Huixtla tried to block about 2,000 migrants from entering the town in recent days, some members of the caravan forced themselves past the police cordon anyway and spent the night in the town center.
“People are just tired of them causing a mess,” said Jonathan Soto, 26, a Huixtla resident.
But many migrants seemed unfazed by the growing public animosity toward them.
Nelson Chirino, a Honduran migrant who was traveling with his 11-year-old son, said he was determined to make it to the United States, even though they had run out of money and were traveling without proper Mexican immigration papers.
”We can’t stop,” he said. “We must push on and never, ever look back.”