Mexico will deport Central American migrants who attempted to storm the US border, its interior ministry said.
The group, part of the migrant caravan heading towards the US from Central America, was rounded up after trying to cross the border “violently” and “illegally” on Sunday.
Video footage shows dozens of people running towards the border fence near the city of Tijuana.
US border officers used tear gas to repel them.
Tension has been running high on the US-Mexican border since the arrival of almost 7,500 migrants over the past weeks.
The migrants, who are mostly from Honduras, but also from Guatemala and El Salvador, say they are fleeing the threat of violence in their home countries and looking to make a better life for themselves and their families.
They have travelled in large groups, dubbed “caravans”, for more than 4,000km (2,500 miles) from Central America and most want to reach the United States, where they say they plan to ask for asylum.
Among them are many families with young children.
But with US President Donald Trump vowing to keep each migrant on the Mexican side of the border until courts have decided their case, they are facing a long wait.
They have been spending the past two weeks in temporary shelters in the Mexican border city of Tijuana and in Mexicali, 180km to the east along the border.
A group of at least 500 migrants joined a march from their shelter in Tijuana towards the border on Sunday.
Mexican Interior Minister Alfonso Navarrete said the migrants had asked for help to organise the demonstration but were then reportedly encouraged by some of the movement’s leaders to split into different groups so they could make a run for the border and try to cross into the US.
The march started peacefully with migrants carrying pro-immigration banners and shouting: “We aren’t criminals! We are hard workers!”.
But once they managed to get past the security cordon, the march quickly turned into a dash for the border, BBC correspondent Will Grant reports.
Several hundred managed to climb over the first barrier, according to Agence France-Press news agency. It was as they tried to cross a second, spike-topped wall that officials on the US side began firing tear gas.
As a result of Sunday’s action, the US closed the San Ysidro border crossing near Tijuana to vehicles and pedestrians for a number of hours before re-opening it.
The closure caused long delays in both directions and angered people like José Fajardo who lives on the Mexican side of the border but works in the US city of San Diego.
US Homeland Security Secretary Kirstjen Nielsen said the migrants had tried to harm US border guards “by throwing projectiles at them”. She said that her department would “not tolerate this type of lawlessness and will not hesitate to shut down ports of entry for security and public safety reasons” and that US officials would “seek to prosecute” offenders.
Mr Trump threatened to close the entire US-Mexico border earlier this week if it was felt the US was going to “lose control” of the situation. He also said he had given troops at the border the go-ahead to use lethal force if needed.
Mexico’s interior ministry said in a statement that a group of “nearly 500 migrants” had “tried to cross the border in a violent way” at El Chaparral border crossing.
Those identified as having taken part in these “violent events” would be deported immediately, he said.
The ministry added that, “far from helping their objectives”, the migrants’ actions had violated the legal migration framework and could have led to a “serious incident”. (Excerpts from BBC)