SAN YSIDRO, Calif. – Dozens of migrants who illegally crossed the U.S. border this weekend as part of a chaotic rush at one of the boundary’s busiest entry points are now in custody, a senior Homeland Security official told Fox News.

The official said Monday about 50 migrants have been detained after they crossed the border near San Ysidro, Calif., on Sunday. The exact number of those apprehended is expected to be made public later today, the official added.

Meanwhile, in Mexico, Tijuana’s municipal government also announced arrests. The Mexican authorities arrested more than three-dozen migrants for disturbing the peace and other charges related to the crossing attempt. This has occurred while thousands of migrants have been gathering there after crossing through Mexico in a series of caravans that originated from Central America—and presumably are amongst those who were arrested on both sides of the border.

During the mad dash, U.S. border agents launched several canisters of tear gas after some migrants attempted to penetrate various points along the border and threw what appeared to be rocks and bottles at U.S. authorities.

Homeland Security Secretary Kirstjen Nielsen said in a statement some migrants “attempted to breach legacy fence infrastructure along the border and sought to harm CBP personnel by throwing projectiles at them.”

“As I have continually stated, DHS will not tolerate this type of lawlessness and will not hesitate to shut down ports of entry for security and public safety reasons,” Nielsen said. “We will also seek to prosecute to the fullest extent of the law anyone who destroys federal property, endangers our frontline operators, or violates our nation’s sovereignty.”

The Mexican Interior Ministry seemed to be on the same page. They said Sunday it would immediately deport the migrants who tried to “violently” breach the border. The Mexican government described Sunday’s events as “acts of provocation” that were “far from helpful” for the migrants’ objectives, reported Fox.

The situation devolved after the group began a peaceful march to appeal to the U.S. to speed the processing of asylum claims for Central American migrants marooned in Tijuana, a burden that was instigated by the movement.

As a result, Mexican police had kept them from walking over a bridge leading to the Mexican port of entry. Regardless of the efforts, migrants pushed past officers to walk across the Tijuana River below the bridge. More police carrying plastic riot shields were on the other side, but migrants walked along the river to an area where only an earthen levee and concertina wire separated them from U.S. Border Patrol agents.

Opportunistically, some saw a chance to breach the crossing. Consequently, the actions forced U.S. Customs and Border Protection to suspend northbound and southbound crossings for both pedestrians and vehicles at the San Ysidro port of entry at approximately 11:30 a.m. local time. It later tweeted that the pedestrian crossings had re-opened, a little more than four hours after the initial closure. The vehicle lanes re-opened at approximately 5 p.m. local time, five-and-a-half hours after they were closed.

The Trump administration has held fast with their assertions. They said asylum claims from members of a series of caravans originating in Central America must be processed outside the U.S. Furthermore, they’ve insisted that all those entering illegally will be denied. A federal judge has at least temporarily ruled against the policy, but the administration has taken steps to harden the border.

“Mexico should move the flag waving Migrants, many of whom are stone cold criminals, back to their countries,” Trump tweeted early Monday morning. “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. Congress, fund the WALL!”