TIJUANA, Mexico — Tensions rose Sunday as hundreds of residents protested the arrival of thousands of Central American migrants who are expected to linger in this border city for months as they try to claim asylum in the United States.

A group opposed to the “chaos” of the so-called migrant caravans protested outside the largest makeshift shelter as Mexican police in riot gear formed a perimeter. The demonstrators sang the Mexican national anthem and waved flags as they urged the migrants to go home.

The protesters said they had no problem with legal immigration, but they were strongly opposed to what they called an "illegal invasion."

Some protesters said the Mexican government should follow President Donald Trump’s lead and adopt tougher border policies.

“He’s defending his border, unlike our president,” said protester Elvia Vijeras. “Now there will be more violence in Tijuana.”

On Friday, Tijuana Mayor Juan Manuel Gastelum called the influx of migrants an “avalanche” that could wind up staying in the city for at least six months.

On Sunday, President Trump tweeted about Gastelum saying the city was “ill-prepared” for the migrants.

“Likewise, the U.S. is ill-prepared for this invasion, and will not stand for it,” Trump tweeted. “They are causing crime and big problems in Mexico. Go home!”

The Mayor of Tijuana, Mexico, just stated that “the City is ill-prepared to handle this many migrants, the backlog could last 6 months.” Likewise, the U.S. is ill-prepared for this invasion, and will not stand for it. They are causing crime and big problems in Mexico. Go home! — Donald J. Trump (@realDonaldTrump) November 18, 2018

Some protesters said they had previously disagreed with Trump on issues — but not this one.

Roy Grant, who lives in Tijuana and works in San Diego, said he fears any mass demonstrations by the migrants could end up shutting down the San Ysidro Port of Entry.

“I think these migrants need to go back to their country,” Grant said. “Mexico needs to take a very aggressive, hands-on approach and deport them.”

Grant said he found himself an an unlikely supporter of Trump's hard-line position on immigration.

“It’s about how he says it, not what he says, that’s offensive to people,” Grant said.

About 10,000 people are making their way through Mexico in at least three separate caravans. The first began in early October in San Pedro Sula, Honduras. Since then, the groups of migrants have walked, taken buses or hitched rides on any vehicle they could find as they made the grueling trek north with the intent to seek asylum in the United States.

Many have said they are fleeing violence and poverty in their home country and that they travel together in the belief that there's safety in numbers as they make the treacherous journey.

Trump seized on the issues of immigration and the caravans before the midterm elections, calling the migrant groups “an invasion” and using them to rally his supporters. He also deployed nearly 6,000 troops to the southern border.

Francis Belmontes, who brought his two children to the protest, said his seven-year-old daughter told him that some of the migrants were urinating outside of her school and asking for money.

He said not all the migrants were mothers seeking a better life for their children, and he had seen young men with tattoos who he believed were gang members. He said he worried for his children’s safety.

“It’s chaos,” he said. “We’re sounding like Trump’s America here in Mexico.”

Belmontes said he wasn’t sure what the migrants expected once they got to the U.S.-Mexico border.

“They chose the wrong time to get asylum,” Belmontes said. “(Trump) clearly doesn’t want them there.”