The migrants, who are fleeing poverty and violence, have said they would wait there until they could request asylum, despite growing US measures to tighten the border. News pictures showing children fleeing tear gas prompted sharp criticism from some lawmakers and charities.
The U.S. Department of Homeland Security said that 42 migrants who illegally crossed the U.S. -Mexico border over the weekend are now in custody. "Women and children who left their lives behind - seeking peace and asylum - were met with violence and fear".
Homeland Security Secretary Kirstjen Nielsen said in a statement that some migrants "attempted to breach legacy fence infrastructure along the border and sought to harm CBP personnel by throwing projectiles at them".
In addition to the arrests, the Mexican government is planning to deport as many as 500 migrants they say attempted to enter the US violently and illegally.
Mexican police, some wielding shields, scattered migrants and protesters, many of whom rushed toward the US border.
More than 5,000 Central American migrants have been camped out for more than a week at a sports complex in Tijuana awaiting an opportunity to seek asylum in the United States.
Mexico has been in negotiations with the United States over a possible scheme to keep migrants in Mexico while their asylum claims are processed. U.S. Customs and Border Protection officers repelled them with a volley of canisters emitting large clouds of gas as U.S. and Mexican government helicopters clattered overhead.
Tijuana Mayor Juan Manuel Gastelum on Friday declared a humanitarian crisis in his border city of 1.6 million, which he says is struggling to accommodate the crush of migrants. "Even so, I'm not going back to Honduras, I want to go to the United States".
USA lawmakers face a deadline to approve funding for the federal government by December 7. During his presidential campaign, he promised he'd have Mexico pay for a wall.More news: Multiple injured, suspect dead in Thanksgiving Day shooting at Riverchase Galleria
He also accused people who are coordinating the caravan of intentionally displaying women and children to "pull the heartstrings of America", and said the media is playing along.
The US president's threat comes a day after American authorities closed the country's busiest southern border crossing and fired tear gas into crowds.
It was not immediately clear whether those throwing objects at United States agents were part of the caravan, MSNBC reported.
Other Democrats complained about threats of "deadly force" against the border incursions, which saw migrants punch through fencing, and launch rocks and bottles at agents who responded to stem the intrusion. The plan could put migrants at risk, says Lee Gelernt, deputy director of the American Civil Liberties Union Immigrants' Rights Project.
As the morning wore on, and it became clear they would not get permission, people started to express frustration.
Critics said this was aimed largely at bringing the immigration issue to the fore with his core supporters.
With the caravan as a backdrop, Trump has used national security powers to circumvent longstanding immigration law to deny asylum to anyone caught crossing the border illegally.
"We can't have all these people here", he said. We are affected at the border crossing.
US Senator Angus King, another independent, told the Hugh Hewitt syndicated radio program the wall did not appear to be a high priority for Republicans or Democrats in Congress.
The chaos comes as US and Mexican officials wrangle over the issue of migration and discuss how to deal with asylum-seekers waiting in Mexico.