The Supreme Court’s ruling last week to keep in place a Trump-era immigration order can only be understood as five conservative justices advancing a conservative political agenda, in violation of clear legal rules.

Without giving reasons or any explanation, the court reversed lower court decisions that allowed the Biden administration to lift a restriction that prevents asylum seekers at the border from entering the country, imposed early during the COVID-19 pandemic.

The federal law — referred to as Title 42 — permits the Centers for Disease Control and Prevention to prohibit people from coming into the U.S. to avert the spread of a “communicable disease” present in a foreign country.

In March 2020, the Trump administration announced that it would use this power to expel those entering at the Canadian and Mexican borders from the United States. Since then, Title 42 has been used 2.5 million times to turn migrants back.

But the public health situation no longer warrants excluding people from the country to limit the spread of COVID. In April, the Biden administration recognized this and announced that it was rescinding the Trump order. Soon after, a conservative federal District Court judge in Louisiana blocked this decision, saying that the Biden administration did not follow proper procedures. The Biden administration’s appeal of this ruling is pending.

In November, U.S. District Judge Emmet Sullivan, in Washington, D.C., found that the continued use of Title 42 was “arbitrary and capricious in violation of the Administrative Procedure Act.” He ruled that the expulsion policy was no longer justified based in light of the present state of the pandemic, which includes widely available vaccines, treatments and increased travel in the United States.

Nineteen states with Republican attorneys general, however, oppose that ruling and sought the right to appeal to the U.S. Court of Appeals for the District of Columbia Circuit. They were not parties to the lawsuit in the District Court and the law generally does not allow parties to get into a case for the first time at the appeals level. On Dec. 16, the federal Court of Appeals, following its well-established law, refused to allow the states to intervene. The states then sought Supreme Court review of that decision.

On Dec. 27, in Arizona vs. Mayorkas, the Supreme Court, in a 5-4 ruling, not only said that it would hear the states’ appeal, but that it would require that the Biden administration continue to use Title 42 to expel migrants.

The court’s action makes no sense for several reasons. Title 42 provides the government authority to close the borders only if a public health crisis involving a communicable disease requires it. No one in the litigation disputes that COVID no longer warrants restrictions on immigration.

Justice Neil M. Gorsuch, a staunch conservative, joined the three liberal justices in dissenting from the court’s ruling and stated: “The current border crisis is not a COVID crisis. And courts should not be in the business of perpetuating administrative edicts designed for one emergency only because elected officials have failed to address a different emergency.”

The states are intervening not because they believe that a continuing public health emergency requires Title 42, but because they want to use it as a pretext to close the borders.

In fact, in another case now pending on the Supreme Court’s docket — on whether the Biden administration’s student loan forgiveness program is justified as a response to the pandemic emergency — 12 of the states in the Title 42 case argued in their brief that “COVID-19 is now irrelevant to nearly all Americans.”

The Supreme Court’s order is senseless for another reason: The only issue before the court is whether the states can intervene in the case. It is not about whether the District Court erred in ending the use of Title 42 to expel migrants. Even if the states were allowed to join the case, they can’t plausibly make the case that COVID concerns still justify immigration expulsions at this point.

Why did the court go so far astray from the law? Surely, it is not that the five conservative justices believe that the COVID emergency still requires the immigration restriction. After all, these were the same justices who in January 2022 said that there was not a sufficient public health emergency to allow the Biden administration to mandate that employers in workplaces with over 100 employees have them vaccinated against COVID or be tested.

The five conservative justices based their decision not on the purpose of Title 42, which is to stop the spread of a communicable disease, but on their partisan agreement with conservatives on immigration issues. We should expect better of the court than that.

Erwin Chemerinsky is a contributing writer to Opinion and dean of the UC Berkeley School of Law. His latest book is “Worse Than Nothing: The Dangerous Fallacy of Originalism.”