Mexico says it has deported nearly 100 Central American migrants a day after they tried to storm the US border.
The group, among thousands of migrants heading towards the US, was rounded up after trying to cross the border "violently" and "illegally" on Sunday, said the interior ministry.
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 and said some threw rocks.
US President Donald Trump has reiterated a threat he made last week to close the border completely.
Mexico should move the flag waving Migrants, many of whom are stone cold criminals, back to their countries. Do it by plane, do it by bus, do it anyway you want, but they are NOT coming into the U.S.A. We will close the Border permanently if need be. Congress, fund the WALL!— Donald J. Trump (@realDonaldTrump) November 26, 2018
On Monday US officials confirmed that 42 people who managed to cross on Sunday had been arrested, accused of disturbing the peace and other charges.
And Gerardo Garcia Benavente, of Mexico's migration office, said: "98 foreigners were returned to their country last night following the violent incident at the border post."
Who are the migrants?
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.
President Trump has vowed to keep each migrant on the Mexican side of the border until courts have decided their cases, meaning some face 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.
How did events unfold?
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 AFP news agency. It was as they tried to cross a second, spike-topped wall that officials on the US side began firing tear gas.
An AFP journalist saw the migrants - including mothers and children - trying to protect themselves from the gas.
Associated Press Mexico correspondent Chris Sherman said he had seen parents running away with choking toddlers. Among them was Honduran migrant Ana Zuniga, 23, and her three-year-old child: "We ran but when you run, the smoke smothers you more."
US Customs and Border Protection, which polices the border, said its personnel had been assaulted and hit by rocks.
Today, several migrants threw projectiles at the agents in San Diego. Border Patrol agents deployed tear gas to dispel the group because of the risk to agents' safety. Several agents were hit by the projectiles. The situation is evolving and a statement is forthcoming.— CBP (@CBP) November 25, 2018
Chief Patrol Agent Rodney Scott told CNN on Monday: "There were sections that had dilapidated border wall that was made out of scrap metal the military gave us.
"The group breached a couple of sections of that, actually tore down one small section."
What was the US reaction?
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, causing long delays in both directions.
US Homeland Security Secretary Kirstjen Nielsen said the migrants had tried to harm US border guards "by throwing projectiles at them".
She said the 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 has said he has given troops at the border the go-ahead to use lethal force if needed, but no soldiers were involved in Sunday's confrontation.
What did Mexico say?
Mexico's interior ministry said that, "far from helping their objectives", the migrants' actions had violated the legal migration framework and could have led to a "serious incident".
The ministry also said on Sunday it has deported 11,000 Central Americans since 19 October, when this influx of migrants first entered the country.
The mood in the migrant shelter is likely to darken, says the BBC's Will Grant.
And with many in the shelters realising how long the wait for asylum could be, some, like Honduran Joseph García, are growing increasingly desperate: "My little girl is sick and I don't even have money for milk. I can't stand it anymore."