President Joe Biden got some bad news on Friday when a federal judge ordered him to reimplement a key policy from his predecessor Donald Trump that forced foreign nationals seeking to enter the U.S. through the southern border illegally to be sent back to Mexico and wait there while their legal cases are adjudicated.

Judge Matthew J. Kacsmaryk called on Biden to “enforce and implement [Migrant Protection Protocols, commonly referred to as ‘Remain in Mexico’] in good faith until such a time as it has been lawfully rescinded in compliance with the [Administrative Procedure Act] and until such a time as the federal government has sufficient detention capacity to detain all aliens subject to mandatory detention under Section 1255 without releasing any aliens because of a lack of detention resources,” according to The Daily Wire.

Homeland Security Secretary Alejandro Mayorkas ended the program on June 1, saying that it “does not adequately or sustainably enhance border management in such a way as to justify the program’s extensive operational burdens and other shortfalls.”

Judge Kacsmaryk, however, ruled that Mayorkas failed “to show a reasoned decision” for ending the program. He also also faulted him for not addressing “the problems created by false claims of asylum” or considering that many asylum seekers are “found non-meritorious by federal immigration judges.” Judge Kacsmaryk was appointed by former President Trump.

Missouri Attorney General Eric Schmitt, who filed the lawsuit with Texas Attorney General Ken Paxton, took to Twitter to celebrate this ruling, which he described as a “big win for border security!”

“The Biden administration’s lax border policies increase the risk for human trafficking at the border and, in turn, in Missouri,” Schmitt said, according to Bloomberg.

“We just won our second immigration lawsuit against the Biden Admin! They unlawfully tried to shut down the legal and effective Remain-in-Mexico program, but Texas and Missouri wouldn’t have it,” Paxton’s office tweeted. “Together we sued, and just handed Biden yet another major loss!”

Since Biden took office, the border crisis has gotten completely out of control in the eyes of many Americans.