At least one man was wounded, he told AFP.
Mexican police, some wielding shields, scattered migrants and protesters, many of whom rushed toward the USA border.
On Monday, U.S. President Donald Trump took to Twitter to express his displeasure with the caravans in Mexico and to make another pitch for his promised border wall. He said the aim of Sunday's march was to make the migrants' suffering more visible to US and Mexican officials.
"This is a vast majority of males seeking employment in the United States, not women and children", said Homan.
"Now our resources are stretched even thinner than they were in the past", he added, noting that very few people, based on their pre-interviews, qualify for asylum.
Irineo Mujica has traveled with the migrants for weeks as a representative of the aid group Pueblo Sin Fronteras.
"Mexico should move the flag-waving migrants, many of whom are stone-cold criminals, back to their countries". "You've seen them, they're carrying signs, 'I want a job.' That doesn't qualify for asylum".More news: Russian Federation vs. Ukraine: War on high seas
Tijuana Mayor Juan Manuel Gastelum said the throngs of migrants who have descended on his city is tantamount to a humanitarian crisis, and he declared an emergency. 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.
After the unrest Mexico on Monday deported 98 Central Americans, following their arrest.
Although Mexican police were stationed nearby, they were outnumbered and overwhelmed by the unexpected rush.More news: Trump Asks Top Court to Skip Protocol, Immediately Consider Trans Military Ban
When they neared the second fence U.S. border agents fired tear gas and rubber bullets at them as helicopters buzzed overhead, an AFP journalist saw. Many pointed to the children left gagging from the gas attack as evidence that Trump's push against a caravan of asylum seekers from Central America had gone too far.
"We were told that if we crossed (the first barrier) they would give us asylum, because we were already in the United States", said Flor Jimenez, a 32-year-old Honduran woman who was among those who turned back along with her husband, sister and young daughter.
"We've got to look at the facts here". Then, some of the migrants start throwing rocks at the agents.
Asked about Trump's warning that the USA could close the border "permanently" - which would disrupt billions of dollars in trade - Marcelo Ebrard, who is to be Lopez Obrador's foreign relations secretary, said, "Let's hope we can keep that from happening". They were pushed back by tear gas will be deported by Mexico.More news: American missionary John Chau bore gifts for tribespeople