This is an archived article and the information in the article may be outdated. Please look at the time stamp on the story to see when it was last updated.

Please enable Javascript to watch this video

SAN YSIDRO, Calif. -- Officials shut down the San Ysidro port of entry to both cars and pedestrians Sunday morning after hundreds of migrants surged toward the US-Mexico border from Tijuana.

Traffic reopened to pedestrians shortly before 4 p.m. and opened for vehicles in both directions around 5 p.m.

Groups of Central American migrants have been converging on the Mexican border city for days in their quest to gain entry to the United States. Their presence has drawn Mexican troops, protesters and fiery rhetoric from President Donald Trump and Mexican officials.

As crowds amassed at San Ysidro, around 500 migrants overwhelmed federal and local Mexican police blockades and rushed toward the border, said freelance reporter Alfredo Alvarez, who was in the crowd. The crowds were made up of men, women and a lot of children, Alvarez said.

With bridge and pedestrian border crossings closed in both directions, the migrants headed for the cargo area where the railroad crosses, where they appeared to get close to the border wall, Alvarez said.

Please enable Javascript to watch this video

Border Patrol agents used tear gas to keep caravan members back from the border fence, CBP confirmed. The agency said some agents were hit by "projectiles" thrown from the other side of the border.

Agents also detained "multiple people" who tried to cross the border illegally, according to CBP. Mexico's Interior Ministry said those identified as having tried to illegally cross from Mexico into the United States will be processed for deportation to their home countries.

Brendan Cassidy, an organizer with the San Diego Migrant and Refugee Coalition, said the group planned to march to the border in San Ysidro to support the migrants Sunday, and he said members of the caravan were trying to meet up with demonstrators on the US side when they were stopped.

"From folks on the other side, it appears like they were trying to march to El Chaparral and they got blocked by police," Cassidy told City News Service. "They were able to call the San Diego side and tell us what was going on."

Caltrans posted a list of closures on Interstate 5 and I-805 resulting from the border shutdown. The closures were lifted after the border reopened.

We’re picking up the #SYPOE related closures on I-5/805. Follow us for real-time traffic info or use https://t.co/OBt0HNSEgt to check future commute https://t.co/AS8XV34tcI — Caltrans San Diego (@SDCaltrans) November 26, 2018

San Diego MTS suspended trolley service at the San Ysidro Transit Center and directed travelers to bus routes that could take them to other border crossings until shortly after 4 p.m., when the Transit Center reopened and the Blue Line Trolley went back to normal service.

Las Americas Premium Outlets in San Ysidro also closed as a result of the events:

[protected-iframe id="43fe487f594f8db7460a4850268baac8-41640027-54120122" info="https://www.facebook.com/plugins/post.php?href=https%3A%2F%2Fwww.facebook.com%2Flasamericaspremiumoutlets%2Fposts%2F1138031103016480&width=500" width="500" height="674" frameborder="0" style="border:none;overflow:hidden" scrolling="no"]

In a tweet posted Sunday afternoon, U.S. Secretary of Homeland Security Kirstjen Nielsen said her department "will not tolerate this type of lawlessness & will not hesitate to shut down (ports of entry) for security reasons.

"We'll seek to prosecute to the fullest extent of the law anyone who destroys federal property, endangers our frontline operators, or violates our sovereignty," she said.

San Diego Mayor Kevin Faulconer tweeted a plea to officials from both countries to "safely resolve the migrant crisis," saying San Diego's way of life "relies on a safe, secure and functioning border."

It is critical that U.S. and Mexican federal leaders work together to safely resolve the migrant crisis. Our way of life relies on a safe, secure and functioning border. From travel to shipping to daily commutes between San Diego and Tijuana, it is essential to our community. — Kevin Faulconer (@Kevin_Faulconer) November 26, 2018

President Donald Trump posted a tweet criticizing Mexico's handling of the caravan earlier Sunday, before the border closures happened.

"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 U.S. No longer). Dems created this problem. No crossings!"

But U.S. Rep. Juan Vargas, D-San Diego, pointed the finger at Trump.

"Today's unprecedented demonstration at the San Ysidro Port of Entry is a direct result of President Trump's failed leadership," Vargas said in a statement. "His complete disregard for human rights, international law, and immigration law threatens the safety of federal officers and the millions of people that pass through the border region."

The mayor of Tijuana said on Sunday that he would not let the migrants' actions damage the city's relationship with its neighbors across the border. Many residents of Tijuana work, study and visit the United States each day, and the border closures affect them, too, Juan Manuel Gastélum said on Twitter on Sunday.

The mayor has said previously that the city cannot support the migrants.