The US temporarily closed its busiest border crossing with Mexico to boost security after a migrant caravan arrived in northern Mexico.
Northbound traffic and half the pedestrian crossings at the San Ysidro border point were shut to install new movable wire-topped barriers.
Around 110,000 people enter the US daily through the crossing.
In the Mexican border city of Tijuana residents held protests demanding the migrants leave the area,
Mayor Juan Manuel Gastelum said on Friday he expected the number of migrants arriving in the city in the coming weeks to reach 10,000, warning the city was not prepared to handle the "avalanche".
The new arrivals say they are fleeing persecution, poverty and violence in their home countries of Honduras, Guatemala and El Salvador.
Another migrant caravan of around 150 people reportedly set off from El Salvador for the US on Sunday.
US Customs and Border Protection (CBP) has since reopened many of the closed lanes at San Ysidro. Southbound traffic into Mexico was not affected.
In a conference call, Department of Homeland Security officials said they had received information about possible attempts to illegally enter the US, and so closed the crossing for about three hours to implement the new security measures.
"We have identified more than 500 criminals travelling with the caravan flow," the officials said, arguing that organisers "are pushing women, children and LGBT community members to the front of the caravan for positive PR".
San Ysidro is the busiest land border point of entry into the US, according to the Department of Homeland Security. About 40,000 cars make the journey between Tijuana and San Diego daily.
Despite its size, San Ysidro only processes about 100 asylum seekers a day.
The view from Mexico side
Will Grant, BBC News, Tijuana
Tijuana is a city of some 1.6 million people and thought to be the busiest border crossing in the world.
As such, a protest of some 200 anti-migrant demonstrators over the weekend can't be taken as indicative of the people in Tijuana as a whole.
Yet the anger did show that a nerve has been touched by the migrants' arrival at the US-Mexico border. Given the difficulty of reaching their ultimate destination - the United States itself - some migrants may end up spending some weeks or even months in the city.
The mayor of Tijuana has stoked feelings further by describing the migrants as an "avalanche" and saying that the city authorities were struggling to cope, a comment that was immediately seized upon by President Trump. Furthermore there are still hundreds more migrants to arrive in the coming hours from other points in northern Mexico.
As those who've stuck with the caravan decide their options - between applying for asylum in the US, settling in Mexico or trying to cross the border undetected - they're being housed in a sports centre and similar facilities across Tijuana.
After a trip of over 4,000km (2,485 miles), it seems the last few hundred metres will prove the hardest leg to complete.
The view from US side
Aleem Maqbool, BBC News, California
If, after travelling so far and not being allowed through the legal US channels, some of the Honduran migrants decide to try an illegal route across the border, they may try to come through the hills at the western-most part of the land border.
People on ranches in the area have been accustomed to migrants coming across this way.
"When people are hiding in the bushes, my horse can always detect them, even if I can't," Becky tells me. "But it happens so much less than 10 or 20 years ago."
She attributes the fact that only a tiny fraction of the numbers of migrants of 20 years ago is coming across illegally to the many US border patrol units that we see close by.
Becky supports troops being sent here and is vehemently against people coming across illegally.
But Jessica Winney, who has around 200 horses on her ranches, feels the rhetoric and the troop deployment is unnecessary and purely political.
"When I have seen migrants coming across our land, which is rare these days, I feel sorry for them. In the end my main concern is my family and my business and the way this is being portrayed as an 'assault on the border' means people get the wrong impression about my area which is very safe."
US President Donald Trump has characterised the migrant caravan as an "invasion" and has deployed thousands of US troops to the border.
He tweeted on Sunday that the US is "ill-prepared" for the migrants and "will not stand for it".
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