A federal judge on Friday temporarily blocked the Biden administration from ending the Title 42 public health order on May 23 -- stopping the administration from a move that had seen significant Republican and Democratic opposition amid fears it would exacerbate the border crisis.

Judge Robert Summerhays, in the Western District of Louisiana, granted a preliminary injunction on the Biden administration’s plan to end the order on May 23. It was in response to a lawsuit by two dozen Republican states, led by Arizona, Louisiana and Missouri.

"Today’s ruling is a significant win as Title 42 is one of the few policies that is actually working," said Arizona Attorney General Mark Brnovich. "I’m grateful to the court for upholding the rule of law and helping maintain some level of sanity as we continue to battle the Biden-made border crisis."

FEDERAL JUDGE EXTENDS ORDER BLOCKING BIDEN ADMIN FROM ROLLING BACK TITLE 42 AHEAD OF HEARING

The Centers for Disease Control (CDC) had announced in April that the order, which has been used since March 2020 to expel a majority of migrants at the southern border due to the COVID-19 pandemic, would expire at the end of May.

"After considering current public health conditions and an increased availability of tools to fight COVID-19 (such as highly effective vaccines and therapeutics), the CDC Director has determined that an Order suspending the right to introduce migrants into the United States is no longer necessary," the agency said.

The move sparked outrage from both Democrats and Republicans, who warned that the move would lead to a surge in illegal immigration at the border and more people being released into the U.S. 

DHS has acknowledged these concerns, saying it is planning for up to 18,000 people a day. However, it has also said that it believes that over time it will reduce the numbers encountered at the border when it re-implements criminal penalties for repeat border crossings.

A number of moderate Democrats joined Republicans in signing onto legislation preventing the administration from lifting the order until 60 days after the CDC says the national emergency on COVID-19 is over. That legislation has not yet been voted on in the Senate.

INTERNAL CBP DOC WARNS OF ‘SIGNIFICANT SAFETY IMPLICATIONS’ OF TITLE 42 LIFT, CARTEL HOLD ON CENTRAL AMERICA 

The Republican lawsuit, seeking the injunction, claimed the lifting of the order violated the Administrative Procedures Act (APA), which requires a notice-and-comment period and also bars moves deemed "arbitrary and capricious."

The lawsuit claims the administration failed to estimate or account for the costs to the states. They cite "increased health care costs for aliens infected with COVID-19 and the cost of increased illegal immigration caused by the Termination Order and the presence of much greater numbers of paroled aliens with non-meritorious asylum claims who were induced to enter the United States because of the Termination Order."

"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 catastrophe," the complaint read.

Summerhays, in his order, said that the record supports the states' position "that the Termination Order will result in increased border crossings and that, based on the government's estimates, the increase may be as high as three-fold." He also agreed with states that lifting Title 42 will increase costs on healthcare and education – and said the government did not dispute that claim.

"In sum, the Plaintiff States have demonstrated that the Termination Order will affect their ‘quasi-sovereign’ interests based on its impact on their healthcare systems and their interest in the health and welfare of their citizens," he said.

The judge also agreed with the states that the lifting of Title 42 was subject to the APA, and that the government did not overcome "the presumption of reviewability under the APA."

Missouri Attorney General Eric Schmitt declared victory, saying the states had "again scored a big win against the Biden Administration and obtained a preliminary injunction, keeping Title 42 in place." 

"With the illegal fentanyl and human trafficking flowing through the porous Southern border, every state is now a border state. My Office will continue to fight to secure our border and protect Missourians and Americans," he said.

Florida AG Ashley Moody, in a statement to Fox News Digital, said that the ruling was "a great win for the safety and security of our nation."

"Proud of our efforts to keep Title 42 in place," Moody said. "It is a sad reality that a court must force this president to do his job and protect the American people."

CLICK HERE TO GET THE FOX NEWS APP

Summerhays, a Trump nominee, was widely seen as likely to issue the injunction, particularly as he had granted a temporary restraining order preventing the Department of Homeland Security from transitioning away from Title 42 by removing migrants via a process called "expedited removal" instead.

The Justice Department is expected to appeal the federal district court judge’s ruling, and the Supreme Court may be asked to weigh in with an emergency order, but that may not happen for the next several weeks.          

DHS said in a statement that it will comply with the judge's order "as long as it remains in place."

"Meanwhile, DHS will continue to execute its comprehensive, whole-of-government plan to manage potential increases in the number of migrants encountered at our border. As part of this effort, DHS has established a Southwest Border Coordination Center to execute those plans," the statement said. "DHS will also increase personnel and resources as needed, and has already redeployed more than 600 additional law enforcement officers to the border."

Meanwhile, the number of migrants encountered at the southern border has remained at highs not seen in decades. There were more than 234,000 migrant encounters in April, compared to 178,000 in April 2021 and just 17,106 in April 2020.

Fox News' Bill Mears contributed to this report.