The 5th Circuit Court of Appeals has denied Democratic President Joe Biden’s administration’s request to overturn former President Donald Trump’s “remain in Mexico” immigration policy.

The decision, written by the court’s three Republican-appointed judges, stated that the Biden administration attempted to end the program, known as the Migration Protection Protocols (MPP), illegally and in violation of the Administrative Procedure Act.

According to the 1946 law, any new procedures issued by federal agencies must first be developed in a trial-like hearing “with witness testimony, a written record, and a final decision” that courts can review.

The appeals court also stated that congressional law requires the federal government to evaluate undocumented migrants attempting to enter the United States on a “case-by-case basis.”

In a memorandum dated June 1, the Department of Homeland Security (DHS) sought to repeal MPP. After a federal judge rejected Biden’s bid, the DHS issued a second memo in October, attempting to explain the DHS’ decision in greater detail. However, an appeals court ruling issued on Monday effectively declared that the second attempt was illegal.

The appeals court wrote in its decision, “The Government’s position in this case has far-reaching implications for the separation of powers and the rule of law.” “The government claims unreviewable and unilateral authority to create and eliminate entire components of the federal bureaucracy affecting countless people, tax dollars, and sovereign states.”

“DHS claims the ability to enact a massive policy reversal affecting billions of dollars and tens of thousands of people simply by typing a new Word document and posting it on the internet. There was no input from Congress, no standard rulemaking procedures, and no judicial review,” the ruling was upheld.

“If the Government were correct, it would supplant the rule of law with the rule of say-so. We hold the Government is wrong,” the ruling said.

The MPP policy, which Trump implemented on January 25, 2019, requires immigrants and asylum seekers to remain in Mexico while their immigration court proceedings in the United States are pending. Its implementation met the Trump administration’s goal of reducing the number of immigrants in the country.

Despite the court’s decision, the “remain in Mexico” policy does not apply to every undocumented immigrant who arrives at the southern border, according to Justice for Immigrants, a U.S.-based advocacy organization for Catholic immigration reform.

It does not apply to unaccompanied minors, nor to violent offenders or other known criminals who should be imprisoned in the United States or Mexico. The policy also excludes migrants with known mental or medical health issues, as well as those determined by the Department of Homeland Security to be at risk of persecution or torture if they remain in Mexico. Migrants awaiting trial in Mexican border towns live in “inhumane” conditions and are “preyed upon by criminal organizations,” a Doctors Without Borders spokesman told Border Report on March 9.

Waiting migrants are frequently cut off from all family, legal, and social supports in their home country. They do not always have viable options for stable housing, food, money, medical care, or other forms of social support. Drug cartel operatives can recruit or kidnap migrants, holding them hostage for ransom or killing them if their families do not comply with their financial or criminal demands.

However, shortly after the White House announced the changes to the MPP in June, Homeland Security Secretary Alejandro Mayorkas stated that migrants should not respond by flocking to the US border.

“Individuals who are not eligible under this initial phase should wait for further instructions and refrain from traveling to the border,” Mayorkas said in a statement. “Due to the current pandemic, restrictions at the border remain in place and will be enforced.”

Mayorkas’ statement showed the delicate balance the Biden administration must strike. The more humane his administration’s immigration policies are, the more likely they are to attract further migration.