(Bloomberg) -- The US Supreme Court cleared the way for President Joe Biden’s administration to shift the government’s immigration enforcement priorities to focus on people who recently crossed the border or are a threat to public safety.

Voting 8-1 to reject two Republican-led states, the justices lifted a lower court ruling that had blocked the Biden apprehension and deportation policy as violating federal law. The administration plans to end a Trump administration approach that focuses more broadly on anyone in the country without authorization.

In an opinion for the court, Justice Brett Kavanaugh said Texas and Louisiana lacked legal standing to challenge the policy shift. He said past cases established that judges can’t hear lawsuits seeking to force the government to make more arrests or press more prosecutions.

“If the court green-lighted this suit, we could anticipate complaints in future years about alleged executive branch under-enforcement of any similarly worded laws — whether they be drug laws, gun laws, obstruction of justice laws, or the like,” Kavanaugh wrote. “We decline to start the federal judiciary down that uncharted path.”

Justice Samuel Alito was the lone dissenter.

It’s the second immigration victory for the administration at the Supreme Court in as many years. The court last year let Biden end a Trump-era policy that had forced asylum-seekers to wait in Mexico for their cases to be processed.

The Supreme Court in July refused on a 5-4 vote to let the Biden administration put its deportation guidelines into effect while the justices considered the case. That left in force a ruling by the conservative 5th US Circuit Court of Appeals, which said the Biden policy “radically reduces” the detention of people who are required by law to be deported.

Texas Governor Greg Abbott called the ruling “outrageous” in a tweet.

“SCOTUS gives the Biden Admin. carte blanche to avoid accountability for abandoning enforcement of immigration laws,” he said. “Texas will continue to deploy the National Guard to repel & turn back illegal immigrants trying to enter Texas illegally.”

Homeland Security Secretary Alejandro Mayorkas hailed the ruling. He said the administration’s guidelines will let immigration officers “focus limited resources and enforcement actions on those who pose a threat to our national security, public safety, and border security.”

Right to Sue

The Biden administration contended the states didn’t allege the type of concrete injury that would give them standing to sue. Texas and Louisiana argued that they have to spend more on law enforcement and social services because of the presence of so many undocumented immigrants within their border.

In their lawsuit, Texas and Louisiana said the Biden approach violates federal immigration law, which says the Department of Homeland Security “shall” detain a broader set of undocumented immigrants who are facing deportation. DHS says it doesn’t have the resources to detain and deport all 11 million undocumented people estimated to be in the US.

Alito cast the dispute as a clash between Congress’ “categorical requirement” and the “more flexible policy” sought by the Biden administration.

“The court’s answer today is that the executive’s policy choice prevails unless Congress, by withholding funds, refusing to confirm presidential nominees, threatening impeachment and removal, etc., can win a test of strength,” Alito wrote. “Relegating Congress to these disruptive measures radically alters the balance of power between Congress and the executive.”

Kavanaugh said the court wasn’t deciding whether Biden was complying with the immigration statutes. “The question of reviewability is different from the question of legality,” he wrote.

Justices Neil Gorsuch, Amy Coney Barrett and Clarence Thomas said in separate opinions they would have used different legal reasoning to toss out the lawsuit on standing grounds.

The case is separate from a clash over the Title 42 border restrictions that applied during the pandemic. The Supreme Court last month scrapped a scheduled showdown over Title 42 after the Biden administration ended the emergency declaration that had formed the policy’s legal basis.

The case is United States v. Texas,  22-58.

--With assistance from Emily Birnbaum.

(Updates with Abbott, Mayorkas reaction starting in eighth paragraph.)

©2023 Bloomberg L.P.