US agents have fired tear gas over the border into Mexico at migrants trying to enter the country illegally.
Around 150 Central Americans tried to make the crossing near the town of Tijuana to the south of California on New Year's Day.
One US official described the migrants as a "violent mob".
It comes as the US federal government remains shut down as President Donald Trump and Congress argue over funding for his proposed border wall.
The US said security forces used tear gas after migrants threw rocks, and that they were deliberately aiming upwind of rock-throwers who they say hindered agents from helping migrants who were passing children over razor wire.
But the Associated Press reports rocks were only thrown after agents fired tear gas, and a Reuters witness says one migrant was struck by what seemed to be a tear gas canister.
US Homeland Security spokeswoman Katie Waldman called the group a "violent mob", and said agents used "the minimum force necessary to defend themselves".
In a statement, Ms Waldman called on Congress to "fully fund the border wall".
US Customs and Border Protection said 25 people were detained, including two teenagers. The majority of migrants returned to Mexico.
A spokesperson for Mexico's foreign ministry said the government "regrets the events" near Tijuana, and called on both sides to respect the law.