President Biden’s effort to terminate a Trump-era policy called, "Remain in Mexico," was stayed by a U.S. District Court Judge this week after litigation bounced between several different courts.

"This action has a complex procedural history, having gone from this Court to the Fifth Circuit, to the Supreme Court, and back to this Court on remand," U.S. District Judge Matthew J. Kacsmaryk wrote in his decision. "Or ‘there and back again.’ See J.R.R. Tolkien, The Hobbit, or There and Back Again (1937)."

Migrants Arizona

Migrants attempting to cross in to the U.S. from Mexico are detained by U.S. Customs and Border Protection at the border August 20, 2022 in San Luis, Arizona.  (Nick Ut/Getty Images)

The decision comes nearly six months after the Supreme Court ruled on a memorandum issued on June 1, 2022, from the Department of Homeland Security Secretary Alejandro Mayorkas. In his memo, Mayorkas terminated Migration Protection Protocols, commonly referred to as the "Remain in Mexico" policy. 

BIDEN MOVES TO END TRUMP-ERA REMAIN IN MEXICO AFTER COURT RULING

In January 2021, DHS suspended new enrollments in the MPPs pending a review of the Trump-era program.

Under the program, migrants not enrolled in MPP should be processed under other existing legal authorities, but Biden issued an executive order directing Mayorkas to review and determine whether to terminate the program or modify it.

President Biden speaks

President Biden speaks about inflation and supply chain issues in Los Angeles.  (AP Photo/Damian Dovarganes)

The State of Texas filed litigation against the move, asserting the memorandum violated the Immigration and Nationality Act, or INA, under which an alien who arrives on land from a foreign territory can be returned to that territory after a court hearing.

REPUBLICANS, HAWKS FEAR BORDER CRISIS WILL GET WORSE AFTER SCOTUS ‘REMAIN-IN-MEXICO’ RULING

A separate provision of the INA says if an alien seeking admission is not clearly and beyond a doubt entitled to be admitted, the alien should be detained until a hearing can be held.

After a court hearing on the lawsuit filed against the Biden administration, a court determined that MPP could not be terminated.

On Oct. 29, 2021, DHS issued memorandums declaring MPP be terminated and requesting the court to vacate its prior judgment and hold the case moot. But the Fifth Circuit Court declined and ruled the memoranda did not have any effect on the appeal.

DHS Secretary Alejandro Mayorkas

Department of Homeland Security (DHS) Secretary Alejandro Mayorkas testifies before a House Homeland Security Committee hearing on "Worldwide Threats to the Homeland" on Capitol Hill in Washington, Nov. 15, 2022.  (Reuters/Michael A. McCoy)

Nearly eight months later, on June 30, 2022, the Supreme Court reversed the Fifth Circuit Court’s decision, ruling that the memoranda held water and the termination of the MPP did not violate the mandatory-detention requirement of the provision.

SUPREME COURT HANDS BIDEN VICTORY, ALLOWS END TO ‘REMAIN IN MEXICO’ POLICY

In the process, though, the court determined the government was violating its obligations.

Still, the case would go back to the U.S. District Court to determine whether the memoranda were arbitrary and capricious.

In his decision this week, Judge Kacsmaryk said the court stays, or suspends the Oct. 29 memoranda and previous decision on June 1, 2021, from DHS to terminate MPP "until the Court can resolve the merits of Plaintiffs' claims."

immigration miderms

Immigration is at the top of the ticket this November as a record number of illegal immigrants continue to cross the border.   (John Moore/Getty Images)

CLICK HERE TO GET THE FOX NEWS APP

Then-candidate Biden pledged to end the program if elected, and soon after entering office the Biden administration shut it down and released those enrolled in the program into the U.S. Mayorkas claimed the policy was not only cruel but ineffective.