TAPACHULA, Mexico (AP) — Hundreds of migrants from Africa, the Caribbean and Central America found themselves corralled in a migrant detention facility in southern Mexico on Sunday after a futile attempt to head north as part of a caravan aiming to reach the United States.

The group set out before sunrise Saturday from the town of Tapachula, where many had been marooned for months unsuccessfully trying to get transit visas. They carried heavy backpacks, babies and parcels on their heads.

Just before dusk, after having trudged more than 20 miles north, they were surrounded by hundreds of National Guard agents and police who persuaded the exhausted migrants to board vans back to Tapachula. Children cried, and women complained angrily about waiting months for papers. It was unclear if any would be deported.

The crackdown on the caravan, many of whose members were of African descent, underlined the sharp reversal from the immigration policy at work in Mexico a year ago, when officials looked the other way as large groups of migrants traversed the country heading for the U.S. But under pressure from Washington, the government has been taking a tougher stance in dealing with migrants, and many Mexicans are being less welcoming.

Salva Lacruz, from the Fray Matías de Córdova Human Rights Center in Tapachula, called the roundup a "human hunt" and noted officials waited until the migrants had tired out before forcing them into vans.

Sending the migrants back south was an "exercise in cruelty," Lacruz said, saying the migrants have come to Mexico because "they need international protection."

About half of the migrants in the caravan were black, including Haitians, estimated Lacruz, who accompanied the group.

Wilner Metelus, a Mexican activist who was born in Haiti, described the government's behavior toward migrants of African descent as "shameful."

"Today the Afro-descendants are alone," he said.

"Migrants of African descent don't represent a threat to Mexicans. Many of them are highly educated and could offer a lot to the country," Metelus added.

The National Migration Institute said in a statement Saturday that each member of the caravan "will be treated in a personalized manner" and that some will be returned to their countries of origin.

The situation for migrants in Mexico has changed dramatically since a caravan set out exactly a year ago from San Pedro Sula, Honduras. That group swelled at its height to 7,000 migrants who banded together to find safety in numbers as they trudged through Guatemala and then Mexico in an attempt to reach the U.S.

Mexican townspeople greeted that caravan with fruit, tortillas and water, while mayors cleared space for the large group to sleep in town squares. Some cities even received the caravan with live music.

The caravans' unfettered passage north also earned Mexican officials the ire of U.S. President Donald Trump, who threatened to close the U.S.-Mexico border if Mexico failed to staunch the flow of migrants.

Mexico's export-driven economy is highly dependent on commerce with the U.S., and the government has become far less hospitable to migrants. In June, officials broke up a large caravan, pulled migrants heading north from trains and detained two migrant advocates for questioning. Migrants also have received less help from townspeople, while governments in Central America have agreed to work to slow the tide of migrants.

"It seems like there is increased enforcement across the region in response to U.S. pressure," said Maureen Meyer, director for Mexico and migrant rights at the Washington Office on Latin America.

Migrants from conflict-wracked African countries set their sights on the Americas after doors began to shut in Europe. A typical journey from Africa involves a flight to Brazil, which has been amenable to granting visas, followed by a long and perilous trip north. The worst patch, many African migrants say, is the trek through Panama's Darien Gap, a dense tropical forest inhabited by venomous snakes and ruthless robbers.

Now, southern Mexico has become a frustrating waystation for thousands of Africans, most of whom would prefer to start anew in the U.S. or Canada because of language and cultural barriers in Mexico.

"These are individuals that have gone through numerous horrors both in their home countries and then on their journey," said Meyer.

Most of the Haitians arriving at Mexico's southern border, meanwhile, have lived in South America for several years after some nations granted them protected immigration status. Now such policies are less favorable, propelling the Haitians to seek a new home at a time when their country is mired in an intense political crisis. Haiti is the poorest country in the Western Hemisphere.

Mexico has offered refugees the possibility of obtaining work and residency permits to stay in southern Mexico, far from the U.S. border. But those asylum permits are slow-coming in an overstretched immigration system. Also, southern Mexico is the country's poorest region, so job opportunities there are scarce.

Hundreds of African migrants stranded in Tapachula opted against joining the caravan on Saturday and continue to bide their time on the streets.

Joseph Pele Meza, a father of two from Congo, said he feels it's important to respect Mexican laws and wait for a permit to head north.

"Here I am waiting calmly," he said Sunday. "We just ask the authorities to open their hearts, to open the doors to give us documents."

___

Associated Press video journalist Benjamin Alfaro reported this story in Tapachula and AP writer Amy Guthrie reported from Mexico City.

Copyright 2019 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.