A judge’s decision Friday to issue a preliminary injunction on attempts by the Biden administration to end the Title 42 public health order may end up getting the Biden administration -- along with moderate Democrats in tough re-election races -- out of a tricky political situation.

Judge Robert Summerhays temporarily blocked the Center for Disease Control’s move to end the public health order -- which has been used since March 2020 to expel a majority of migrants at the southern border due to the COVID-19 pandemic. It was due to expire on Monday.

FEDERAL JUDGE BLOCKS BIDEN ADMIN FROM ENDING TITLE 42 BORDER EXPULSIONS

He sided with Republican arguments that the order was lifted in violation of the Administrative Procedures Act (APA), and that it would hurt the states by increasing costs related to healthcare, driving licenses and education. He said it would also increase migrant numbers at the border.

"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 move marks another legal defeat on immigration for the Biden administration. However, the move also pours cold water, for now, on a dicey political issue that had seen a number of Democrats criticizing the administration, and Republicans smelling blood in the water as a potential new migrant surge loomed over the horizon.

The Biden administration had repeatedly said that Title 42 is a public health order, not a border security order, and therefore the decision to lift must be made on public health grounds only.

The CDC had said that "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."

But that announcement had sparked outrage from some Democrats as well as 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. 

Republicans made it clear that they would tie any future surge in migration that came after May 23 -- and that could still be ongoing by the time of the midterms in November -- to the decision by the Biden administration.

FILE - A migrant waits on the Mexican side of the border after United States Customs and Border Protection officers detained a couple of migrants crossing the US-Mexico border on the beach, in Tijuana, Mexico, Jan. 26, 2022. (AP Photo/Marco Ugarte, File)

FILE - A migrant waits on the Mexican side of the border after United States Customs and Border Protection officers detained a couple of migrants crossing the US-Mexico border on the beach, in Tijuana, Mexico, Jan. 26, 2022. (AP Photo/Marco Ugarte, File) (AP Photo/Marco Ugarte, File)

"This decision is wrong and will invite a lawless surge of illegal border crossings to enrich human traffickers and overwhelm our Border Patrol," House Republican Leader Kevin McCarthy said in a statement to Fox News Digital last month. "This will inflict suffering, pain, and tragedy throughout our country." 

Moderate Democrats were not much kinder. Sen. Joe Manchin, D-W.Va., called the move a "frightening decision."

"We are already facing an unprecedented increase in migrants this year, and that will only get worse if the Administration ends the Title 42 policy," he said in a statement. "We are nowhere near prepared to deal with that influx.

MODERATE DEMS UNMOVED BY BIDEN ADMIN'S PLAN TO COPE WITH POST-TITLE 42 MIGRANT SURGE

Manchin, along with a number of moderate Democratic senators -- some of whom are in tight re-election races -- signed on to legislation that would stop the administration from ending the order until 60 days after the CDC declared the COVID-19 emergency over, and until DHS had submitted a sufficient plan.

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

It also stressed that it had a plan in place for the lifting of the order, which includes surging resources to the border and a broader use of expedited removal -- as well as the implementation of criminal penalties.

However, that did not satisfy many of those same Democrats, who said the plan was not enough.

"One of my concerns about…this discussion we've been having about getting ready for the eventual lifting of Title 42 is people keep telling me ‘but we have a plan’ and it isn't clear that having the plan and actually having resources on the ground to meet that plan are the same thing," Sen. Maggie Hassan, D-N.H., said.

CLICK HERE TO GET THE FOX NEWS APP

At the same time, backing away from Title 42 could infuriate the Democratic liberal base, which had called for the end of Title 42 for months -- and had been supported by top Democrats such as Senate Majority Leader Chuck Schumer.

"It is unacceptable that this policy continues to be used indiscriminately to remove migrants with valid refugee claims from our Southern border," Schumer said in March.

For now, then, Summerhays’ ruling allows the Biden administration to continue expelling migrants under the order, soothing the fears of moderate Democrats about an overwhelming border surge at a time when they are facing re-election, while telling liberal Democrats that it is still intending to end the order when it is allowed by the courts.