Mexican authorities closed a border entry point in southern Mexico on Saturday after thousands of Central American migrants tried to push their way across a bridge spanning the Suchiate River between Mexico and Guatemala.

Normally, migrants who want to request asylum in Mexico are allowed to freely cross the bridge. But many migrants prefer to pass through Mexico en route to the U.S., a country that has repeatedly asked Mexico to impede their arrival.

On Saturday, babies cried and tempers flared as hundreds of Mexican National Guardsmen blocked the path of thousands of migrants. Guatemalan authorities estimated 2,500 migrants were on the bridge over the Suchiate, or attempting to get onto the bridge.

As the crowd swelled, amid shoves, Mexican officials allowed several dozen migrants to enter the country in groups of 20, while a voice over a loudspeaker warned migrants against trying to slip into Mexico without passing through immigration filters.

Mexico again finds itself in the role of immigration enforcer as Central Americans desperate for a better life try to make their way north, while Mexico’s biggest trade partner — the United States —insists that Mexico prevent those migrants from reaching the U.S. border.

Mexico’s National Migration Institute said via Twitter on Saturday that it had reinforced multiple points along the country’s southern border to assure “safe, orderly and regular immigration.” It also said it was using drones to monitor the region.

Hundreds of guardsmen lined the river to prevent migrants from crossing into Mexico clandestinely. The voice on the loudspeaker warned, over and over, that those aiming to transit through Mexico may not be granted asylum in the U.S., even if they make it there.

As temperatures rose Saturday, migrants trickled back across the bridge to Guatemala. By late afternoon, fewer than a hundred remained on the span.

Mexico’s government has said migrants entering the country without registering will not be allowed to pass from its southern border area. But those seeking asylum or other protections will be allowed to apply and legalize their status in Mexico.

Guatemalan officials have counted roughly 3,000 migrants who registered at border crossings to enter that country in recent days, and estimated there were an additional 1,300 migrants who did not register.

Guatemala’s human rights defender’s office said there were more than 1,000 migrants gathered at another point on the Mexican border far to the north in the Peten region. There were reports that Mexican forces were gathered on the other side of the border there.

Vicente Hernández, head of the Mexican armed forces in the border area, told migrants on the Guatemalan side of the Suchiate that “there are opportunities for everyone” in Mexico.

“Here you just have to register,” he added, saying that Mexican officials would then offer the migrants jobs.

Mexico’s offer of legal status and potential employment for migrants carries a stipulation that would confine migrants to southern Mexico, where wages are lower and there are fewer jobs than elsewhere in the country.

El Salvador’s consul general in Mexico, Antonio Azúcar, told The Associated Press that Mexican authorities had reported that the migrants crossing into Mexican territory would be housed in Ciudad Hidalgo, the city on the banks of the Suchiate where the bridge standoff happened.

But a Mexican official, who refused to be quoted by name, said those who request asylum in Mexico would be taken to one of two migratory stations in the state of Chiapas — one in Tapachula and the other in Tuxtla Gutiérrez.

Once in custody, in theory, migrants may request temporary work permits to remain in Mexico. For months, however, non-profit groups have complained that the migrants are instead often returned to their countries of origin.

And many of the migrants aim for a new life in the U.S. — not in Mexico.

“We are going to walk all the way up,” said Jazmín González, a 23-year-old Salvadoran clutching a small girl.

González said she feared being deported as she turned herself over Saturday to Mexican authorities, alongside her daughter and three other family members.

Lourdes Geraldina Jiménez of Honduras also decided to trust in the assurances of Mexican officials as she entered Mexico with a son and another family member.

Jiménez said she left Honduras because gang members wanted to kill her 14-year-old son.

“I can’t return to Honduras,” she said, walking next to her son.

Many of the migrants leaving Central America say they fear for their lives back home, while others say they are looking for better economic prospects.