The ‘remain in Mexico’ policy, which was originally put in place while Donald Trump was President, was upheld by a federal appeals court on Tuesday, denying the administration of United States President Joe Biden a reversal.

The policy — formally known as Migrant Protection Protocols– was designed to make people asylum seekers wait in Mexico while their claims are being processed north of the border.

Even though the administration of Joe Biden appealed the decision in August, it began working to reintroduce the policy with the legal battle in the backdrop. Earlier this month, the first two migrants were sent back to Mexico after the policy was reinstated.

Monday’s ruling by three 5th Circuit judges said the administration’s move to end the policy was arbitrary and violated a federal immigration statute requiring detention of those in the country illegally pending removal proceedings.

If there is no capacity to detain them, Judge Andrew Oldham wrote for the panel, the statute allows the United States Department of Homeland Security to return them to “contiguous territories” while proceedings are pending, according to reports from Associated Press.

Hours after taking office in January 2021, Biden suspended the remain in Mexico policy while Alejandro Mayorkas, the head of United States Department of Homeland Security, formally wrapped it up in July.

But the state of Missouri and Texas sued to reinstate it. Texas-based US District Judge Matthew Kacsmaryk issued an injunction keeping the policy in play, saying the administration failed to follow required procedures for ending it and did not have the capacity to detain all asylum seekers.

Mayorkas issued a revised version of the policy on October 29, but Monday’s ruling said the revision “simply reaffirmed the Termination Decision that the States had been challenging all along.”