U.S. Customs and Border Protection closed a section of the southern border with Mexico on Sunday and fired tear gas at a group of migrants that tried to breach a fence separating the two countries.

CNN reported that road and pedestrian bridge access at the San Ysidro port had been closed.

The major artery connects San Diego, Calif., and Tijuana, Mexico.

Video footage from journalists on-site shows hundreds of migrants rushing toward the U.S. border.

The Associated Press reported that U.S. officials fired tear gas at the migrants as they attempted to break through the fence.

President Donald Trump tweeted Sunday morning that Mexico “would be very SMART” to stop the caravans of migrants long before they near the country’s border with the United States.

Instead more than 5,000 migrants have been camping out in Tijuana just across the border.

The U.S. looked to have struck a deal with Mexico on Saturday, which would keep asylum-seekers in Mexico while they wait for U.S. courts to decide their fates.

The Washington Post quoted Mexico’s incoming Interior Minister Olga Sanchez Cordero saying, “For now, we have agreed to this policy of Remain in Mexico.”

Later, however, she said that there was “no agreement of any sorts between the incoming Mexican government and the U.S. government.”

She told Reuters that “very delicate” negotiations about the Central American migrant caravans were ongoing, but the plans for Mexico to be a third party were “ruled out.”

Mexico’s new president, Andres Manual Lopez Obrador, will begin his term on Dec. 1.

The Trump administration wants migrants to stay in Mexico while they wait for their asylum claims to be adjudicated instead of coming into the U.S. and being released.

“Migrants at the Southern Border will not be allowed into the United States until their claims are individually approved in court,” Trump tweeted Saturday, adding that if it becomes “necessary, we will CLOSE our Southern Border.”

Trump administration officials have alleged widespread fraud, suggesting most asylum seekers disappear into the U.S. after making their initial claims.

The administration had also tried to make it so no one could apply for asylum if they crossed into the U.S. illegally, but a Northern California judge blocked the order.

In turn, Trump went on a tear against the Ninth Circuit Court of Appeals, which will be next up at bat to hear the case.

“You cannot win if you’re us, a case in the Ninth Circuit, and I think it’s a disgrace when people file, every case gets filed in the Ninth Circuit. That’s not law. That’s not what this country stands for. Every case gets filed in the Ninth Circuit, we get beaten and then we end up having to go to the Supreme Court,” Trump fumed to reporters.

This report originally appeared on NYPost.com.