HUIXTLA, Mexico (AP) — Several thousand migrants who set off in southern Mexico with the goal of reaching the United States dissolved their march Sunday after Mexican officials handed out about 3,000 temporary residence permits.

The permits will allow the migrants, mostly Venezuelans and Central Americans, to stay on Mexican territory for up 30 days while they pursue immigration procedures, officials from Mexico’s National Institute of Migration said.

“We are going to continue to the United States in buses because we already have the permit. We no longer need to walk,” a Venezuelan, William Molina, said after receiving his permit. He is traveling with 10 relatives.

The group, which had started walking from the border city of Tapachula on Friday, was the ninth migrant caravan to be formed so far this year in southern Mexico.

Migration has returned to the spotlight following the discovery last week of an abandoned cargo truck in San Antonio, Texas, with more than 60 migrants inside. Fifty-three of them died.

The tragedy coincided with a ruling by the U.S. Supreme Court allowing the Biden administration to end a measure imposed by President Donald Trump that forced asylum seekers to wait in Mexico while U.S. officials processed their asylum petitions.

While the migrant caravans have attracted news media attention, those who participate in them represent a small percentage of the migratory flow that arrives at Mexico’s border with Guatemala daily, usually with the help of smugglers.

Another Venezuelan in the group, Francisco Daniel Marcano, said he hoped the permit would help him reach northern Mexico and pass into U.S. territory. But, he said, if he fails to get into the U.S., he will try to find a job in northern Mexico to earn money to send to his parents and three children back in Venezuela.

In the last 30 days at least three large groups totaling about 13,000 people have tried to leave the border with Guatemala on foot, according to Mexico’s immigration agency.

Many migrants object to the Mexican strategy of keeping them in the south, away from the U.S. border. They say the process of normalizing their status — usually through applying for asylum — takes too long and they can’t provide for themselves while waiting weeks in Tapachula because jobs are scarce.

But the latest caravans, made up mostly of entire families, have managed to advance only about 45 kilometers (28 miles) to Huixtla, where Mexican officials have succeeded in dispersing the groups by giving out temporary residency permits.