Three GOP-led states filed a lawsuit against the Biden administration on Sunday in a bid to prevent it from ending Title 42 — a Trump-era public health policy that allowed border officials to deny entry to migrants at the southern border.

“This suit challenges an imminent, man-made, self-inflicted calamity: the abrupt elimination of the only safety valve preventing this administration’s disastrous border policies from devolving into an unmitigated chaos and catastrophe,” the complaint reads.

There are reportedly thousands of migrants just south of the border in Mexico waiting for Title 42 to be rescinded so they can illegally cross over.

The suit was filed in federal court in Louisiana by the GOP attorneys general of Arizona, Louisiana, and Missouri.

The federal Centers for Disease Control and Prevention (CDC) announced Friday that on May 23 it will end Title 42, a public health policy introduced by then-President Donald Trump at the beginning of the COVID-19 pandemic. It allowed border officials to expel migrants who attempted to enter the U.S. from countries where a communicable disease exists.

The plaintiffs argue that the CDC’s termination of Title 42 is illegal both because it violates the “notice-and-comments requirements” contained in the federal Administrative Procedure Act, and because it is “arbitrary and capricious” by failing to consider how the policy’s termination will affect the states.

Immigrant advocates and Democratic lawmakers have long criticized the policy as politically motivated and have been pushing President Joe Biden to end it.

In a letter to Department of Homeland Security Secretary Alejandro Mayorkas two weeks ago, Sen. Rick Scott, R-Fla., and 13 other Republican senators demanded Mayorkas provide information on the department’s preparations and plans to stem the expected influx of thousands of migrants and secure the U.S.-Mexico border.

“Obviously, this is a grave concern that threatens to overwhelm our already strained immigration system and will only exacerbate a disastrous situation at our southern border,” the senators wrote.

In the first year of the Biden administration’s immigration policies, illegal border crossings “soared to all-time highs,” according to the GOP senators.