Mexico plans to deport up to 500 people who tried to “violently” and “illegally” cross the border into the US on Sunday, the interior ministry has said.

Dozens of people ran towards the border crossing between Tijuana and San Diego on Sunday, where US border officers used teargas to repel them. Amid heated rhetoric from Donald Trump and confusion over a reported deal to keep asylum seekers in Mexico, all traffic was halted for several hours on Sunday at the busy border crossing.

US Customs and Border Protection said traffic in both directions was suspended at the San Ysidro port of entry, before later allowing traffic through again.

Migrants approaching the border were met with teargas after a few tried to breach the fence separating the countries. US agents fired the gas, according to an Associated Press reporter on the scene. Children were screaming and coughing in the mayhem.

Facebook Twitter Pinterest Migrants, mostly Hondurans, run along the Tijuana river near the El Chaparral border crossing in Mexico Photograph: Guillermo Arias/AFP/Getty

Honduran Ana Zúñiga, 23, said she saw migrants open a small hole in concertina wire at a gap on the Mexican side of a levee, at which point US agents fired teargas at them.

“We ran but when you run the gas asphyxiates you more,” she said, holding her three-year-old daughter, Valery.

Play Video 13:18 La caravana: On the road with the migrant caravan – video

Mexico’s Milenio TV showed images of people trying to jump the fence. A few metres away on the US side, shoppers streamed in and out of a mall.

Images of young children fleeing teargas prompted concern in some quarters of the US. The former Florida gubernatorial candidate Andrew Gillum said on Twitter US leaders should be strong enough to find compassion for members of the migrant caravan.

Facebook Twitter Pinterest Migrants climb the border fence near El Chaparral border crossing in Tijuana. Photograph: Pedro Pardo/AFP/Getty Images

Tensions have been rising in Tijuana, where more than 5,000 people have been camped in and around a sports complex after making their way through Mexico in caravans – groups of migrants travelling together for safety. Many hope to apply for asylum in the US but agents at the San Ysidro entry point have been processing fewer than 100 asylum applications a day.

On Saturday, the Washington Post reported that the Trump administration had reached a deal with the incoming Mexican government, which takes office on 1 December, to hold asylum seekers south of the border. The incoming interior minister then said no deal had been reached.

On Sunday, several hundred people, mostly men, pushed past a blockade of Mexican police near the crossing. They carried hand-painted US and Honduran flags and chanted: “We are not criminals! We are international workers!”

US border patrol helicopters flew low overhead.

Sign up for the new US morning briefing

Some migrants called on each other to remain peaceful. They appeared to pass easily through the police blockade without using violence. A second line of police carrying plastic riot shields stood guard outside a Mexican customs and immigration plaza. That line of police installed tall steel panels on the Mexican side of the border, completely blocking incoming traffic lanes.

Trump used the caravans as an election issue in this month’s midterms, sending US military to the border and authorising troops to use lethal force.

Earlier on Sunday, the president tweeted: “Would be very SMART if Mexico would stop the Caravans long before they get to our Southern Border, or if originating countries would not let them form (it is a way they get certain people out of their country and dump in US. No longer).”

On Sunday night he complained about a CBS story on his child separation policy. On Monday morning, the president said 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”.

With a nod to an impending deadline for congressional spending measures to be passed, he added: “Congress, fund the WALL!”

Irineo Mujica, who has accompanied the migrants for weeks as part of the aid group Pueblo Sin Fronteras, said the aim of the march towards the border was to make the migrants’ plight more visible to the governments of Mexico and the US.

“We can’t have all these people here,” Mujica told the Associated Press.

On Friday, Tijuana’s mayor, Juan Manuel Gastélum, declared a humanitarian crisis in his city of 1.6 million, which he said was struggling to accommodate the migrants.