The Trump administration is sending military police and other personnel to the border in case the “Remain in Mexico” policy is struck down next week by an appeals court -- amid fears that large groups of migrants could force their way into the U.S. homeland.

The Ninth Circuit Court of Appeals last week ruled to halt the policy, formally known as the Migrant Protection Protocols (MPP), which keeps migrants in Mexico while their asylum hearings play out.

COURT TO HALT TRUMP ADMINISTRATION'S 'REMAIN IN MEXICO' POLICY IN ARIZONA, CALIFORNIA

Officials say it has been vital in bringing down numbers at the border, shrinks down the time to get cases processed, and has reduced the “pull factor” bringing migrants north. Specifically, it helps end “catch and release” by which migrants were detained and then released into the interior of the U.S. But opponents say keeping migrants in Mexico exposes them to the danger of violence and kidnapping.

The court agreed with that argument and struck it down, but hours later agreed to suspend the decision, as the administration said that thousands of migrants would flood the ports of entry. CBP ended up closing or suspending operations at multiple locations in response. The Justice Department had said Friday that at least 25,000 asylum-seekers subject to the policy are currently waiting in Mexico and expressed “massive and irreparable national-security of public-safety concerns" if it was halted.

The government has asked the Supreme Court to take up the case. But if it does not, then the appeals court's ruling will go into effect. If that happens, and the policy is blocked, chaos could ensue, and the administration is getting prepared.

Senior officials at Customs and Border Enforcement (CBP) say that ports of entry are not designed to handle large groups of migrants, but that closing the ports could be considered an “extreme option” in order to ensure safety and security.

INSIDE TRUMP'S IMMIGRATION TENT COURTS: CONTROVERSIAL SYSTEM MEANT TO FAST-TRACK ASYLUM BACKLOG

The Pentagon has provided CBP with a Crisis Response Force (CRF) capability in order to support efforts at the border when needed. That force provides military police support, engineer and aviation support at points of entry.

“Based on the pending MPP decision, continued concern of large groups attempting to forcibly enter through the POEs, and COVID-19 containment and mitigation concerns, CBP has activated the CRF,” officials said, referring also to the spread of the coronavirus.

Officials said that 160 Active Duty personnel will move to the southwest border in anticipation of the decision to two border crossings in El Paso and San Diego.

Opponents reacted angrily to the decision.

"This is a highly dangerous escalation done solely to advance the hateful anti-immigrant narrative,” “the Refugee and Immigration Center for Education and Legal Services said in a statement. “If they care about the health of immigrants, they should send doctors not soldiers.”

Approximately 60,000 migrants have been returned to Mexico under the policy, and DHS has estimated that a majority of those have returned home. Since MPP was expanded, there has been a dramatic drop in migrants coming to the border from the high of April, when 144,000 migrants reached the border. Officials have repeatedly said the policy, along with other international agreements with Central American countries, has been a significant factor in that reduction.

CLICK HERE TO GET THE FOX NEWS APP

“So you get an adverse ruling on MPP and it’s going to make the job of the men and women of Border Patrol as well as [Customs and Border Protection] and [Immigration and Customs Enforcement] ... very difficult for them, so it really can’t be overstated how much the program means to the department in controlling the crisis,” Acting Department of Homeland Security Secretary Chad Wolf told Fox News in November.

Should the case make it to the Supreme Court, the Trump administration’s chances of winning would appear to be solid. The court has ruled in favor of the administration on a range of immigration issues in recent months -- including on the “public charge” rule and on re-appropriating money for the wall on the southern border.

Fox News' Morgan Phillips and The Associated Press contributed to this report.