A federal appeals court in California on Friday initially blocked a centerpiece of the Trump administration's network of restrictive policies at the southern border, ordering officials there to stop sending asylum-seekers to Mexico, where tens of thousands of Latin American migrants returned by the U.S. have been stranded for months.

But later on Friday, the same court temporarily paused its own order, granting an emergency request filed by Trump administration lawyers who rushed to defend the controversial Migrant Protection Protocols (MPP) program.

Through its initial ruling, the 9th Circuit Court of Appeals had prohibited the government from continuing to enforce the program, known as "Remain in Mexico," finding that it is likely illegal. The decision was a major setback for the administration since officials have touted the program as one of the main reasons it curbed an unprecedented influx of Central American families last year that overwhelmed officials and stations across the southern border.

Get Breaking News Delivered to Your Inbox

Since early 2019, the U.S. has required nearly 60,000 asylum-seekers to wait in Mexico for the duration of their immigration court proceedings under this program, which has drawn scathing criticism from advocates. They believe the policy violates both domestic and international refugee law, pointing to the high levels of violence and insecurity in the areas of northern Mexico where the U.S. has been sending migrants placed in the program.

The program's hours-long halt was a short-lived victory for the American Civil Liberties Union (ACLU), the group spearheading the legal challenge against the policy, and immigration advocates and lawyers, some of whom traveled to border checkpoints to see if any of their clients could get relief under the initial ruling.

"This is a temporary step and does not change the fact that courts have ruled multiple times against this illegal policy. We will continue working to permanently end this unspeakably cruel policy," Judy Rabinovitz, the top ACLU attorney in the case, said in a statement.

Immigration lawyers working with the Atlanta-based group Lawyers for Good Government, attempted to inform hundreds of asylum seekers of their legal rights after they had been sent back to Matamoros, as part of the Trump administration's "Remain in Mexico" program. Michael Nigro/Sipa via AP

Hours after the court's initial ruling early Friday afternoon, U.S. Citizenship and Immigration Services (USCIS) asylum officers — who interview asylum-seekers in the "Remain in Mexico" program — were instructed in an email to "immediately cease all MPP processing," including cases "pending decision service." Customs and Border Protection (CBP), the agency that places migrants in the "Remain in Mexico" program, also said it had "issued a cessation of processing" under the program.

On Friday night, top CBP officials, including acting commissioner Mark Morgan, said the agency was reinstating the program.

This evening, with support of DOJ attorneys and CBP’s declaration, the 9th Circuit granted a stay of its earlier order enjoining MPP. @CBP will immediately reinstate MPP! — Acting Commissioner Mark Morgan (@CBPMarkMorgan) February 29, 2020

In their initial order, which upheld a preliminary injunction issued by a federal judge last spring, two circuit judges on a three-judge panel in San Francisco appeared to share the concerns raised by advocates, writing that migrants returned to northern Mexico "risk substantial harm, even death, while they await adjudication of their applications for asylum."

U.S. District Judge William A. Fletcher, who was appointed by President Clinton, said in his majority opinion that the asylum-seekers and legal groups the ACLU is representing are likely to succeed on their two main challenges to the policy: that it violates the "non-refoulement" principle in international and U.S. law of not returning asylum-seekers to places where they may face persecution, and that a 1996 law the administration has been citing to defend the legality of the program does not allow officials to return all asylum-seekers to countries that border the U.S. like Mexico.

Circuit Judge Ferdinand Fernandez, an appointee of President George H. W. Bush, dissented.

Officials across the administration denounced the initial ruling on Friday. "The Trump Administration has acted faithfully to implement a statutory authority provided by Congress over two decades ago and signed into law by President Clinton," a Justice Department spokesperson said in a statement. "The Ninth Circuit's decision not only ignores the Constitutional authority of Congress and the Administration for a policy in effect for over a year, but also extends relief beyond the parties before the Court."

Though he called the first order "reckless," Acting Homeland Security Secretary Chad Wolf said his department has other tools to "maintain the end of catch and release," presumably referring to recently created rapid deportation programs, as well as deals with countries in Central America's Northern Triangle that allow the U.S. to re-route asylum-seekers there.

Asylum seekers wash clothes on the Mexican side of the Rio Grande at an immigrant camp on December 8, 2019 in the border town of Matamoros, Mexico. Getty Images

Democratic Congresswoman Veronica Escobar, who represents the border district in El Paso, praised the 9th Circuit's initial decision. But she called for more than a halt to the policy. "DHS must now follow the law, issue guidance for the nearly 60,000 asylum-seekers who have been returned to Mexico, employ alternatives to detention, and guarantee the humane treatment of all asylum-seekers," Escobar said in a statement.

As a result of the MPP policy, tens of thousands of asylum-seekers from Central America, Cuba, Venezuela and other Latin American countries who would otherwise be in the U.S. are stranded in overcrowded shelters and squalid makeshift encampments in northern Mexico, including in crime-ridden cities like Ciudad Juárez and Matamoros, located in a region the U.S. government warns American travelers not to visit due to rampant violence.

Advocates and even some of the asylum officers implementing the program have been withering in their criticism of Remain in Mexico, saying it violates international obligations against returning migrants seeking refuge to dangerous places. The group Human Rights First has denounced hundreds of reported kidnappings and assaults.

A CBS News series last summer detailed the due process concerns about the policy, which makes it extremely difficult for migrants to secure U.S.-based lawyers generally needed for successful asylum claims. According to data by researchers at Syracuse University, only about 5% of migrants in the program have had lawyers represent them in proceedings in the U.S. — which, for many migrants, now occur inside makeshift tent-like courts in the Rio Grande Valley.

Out of about 35,500 completed cases in the program, only 263 migrants have been granted asylum or some other form of protection, according to Syracuse University's Transactional Records Access Clearinghouse (TRAC).

Despite the criticism, the administration has defended the "Remain in Mexico" program as an effective tool in reducing border apprehensions, which have dropped for eight consecutive months since May.

The policy had been briefly blocked by a federal judge in April, but the 9th Circuit ruled in May that the administration could proceed with the policy as it considered the merits of the legal challenge mounted by several advocacy groups. After the panel's decision, the administration dramatically expanded the program with the consent of the Mexican government, which accepted the expansion last summer after Mr. Trump threatened to impose tariffs.

In a separate ruling on Friday, another panel in the 9th Circuit upheld a lower court injunction that has blocked a rule that would render migrants who cross the border in between ports of entry ineligible for asylum.

"Once again the courts have recognized there is tremendous danger facing asylum seekers along the entire southern border, and that the administration cannot unilaterally rewrite the laws," said Lee Gelernt, the top ACLU attorney in that case.