The Trump administration’s efforts to force state and local authorities to abandon “sanctuary” policies and cooperate with federal immigration agents have mostly been panned by lower courts, and the Supreme Court soon may weigh in.

One justice — albeit one no longer on the high court — already has.

Retired justice David H. Souter last week joined a unanimous panel of the U.S. Court of Appeals for the 1st Circuit ruling that the Justice Department lacks the legal authority to withhold federal crime-fighting grants from local law enforcement agencies to compel such cooperation.

Since his retirement from the Supreme Court in 2009, Souter, 80, regularly has been designated to hear cases on the New England-centered appeals court. He and two other judges turned aside “the DOJ’s kitchen-sink-full of clever legal arguments” that the judges said obscured a bottom-line lack of power.

The law “simply does not allow the DOJ to impose by brute force” immigration enforcement duties that states and localities do not want to perform, wrote Judge Bruce M. Selya, a Ronald Reagan nominee. Souter, chosen for the Supreme Court by President George H.W. Bush, joined Selya and Judge David J. Barron, who was nominated by President Barack Obama.

“The DOJ’s contentions stretch the statutory language beyond hope of recognition,” Selya wrote.

Legal resistance from the left and Democratic-led states to President Trump’s crackdown on undocumented immigrants is being waged at the high court and in courthouses across the country. The Supreme Court has already heard arguments about whether the administration illegally tried to repeal Obama’s program to protect from deportation immigrants brought to this country as children, the Deferred Action for Childhood Arrivals. A decision could come at any time.

And a separate but related “sanctuary” case from California already is under consideration by the justices, and they could announce as soon as Monday whether to review it in their fall term.

The administration is challenging a California law that generally instructs law enforcement not to cooperate with federal immigration agents, such as by refusing requests for notifications about when immigrants might be released from custody.

The law was passed just after Trump took office but has newfound importance as concerns over the coronavirus outbreak have prompted local officials to want to thin the detained population.

A panel of the U.S. Court of Appeals for the 9th Circuit agreed with a district judge who ruled for California, rejecting the administration’s argument that the lack of cooperation undermines federal immigration policy.

“The laws make enforcement more burdensome than it would be if state and local law enforcement provided immigration officers with their assistance,” wrote U.S. District Judge John A. Mendez. “But refusing to help is not the same as impeding.”

The case at the 1st Circuit deals with a federal statute about law enforcement grants, rather than a state law. But the cases share a broad theme: the role of state and local agents in helping enforce federal immigration policy.

The administration says local agents have an obligation to help, and states certainly cannot “adopt a law that makes the jobs of federal immigration authorities more difficult,” as Solicitor General Noel Francisco put it in his brief to the Supreme Court.

Some jurisdictions are willing to play an active role in detaining and reporting the undocumented. But others say the price is too high.

California Attorney General Xavier Becerra told the Supreme Court his state legislature worried that “undue entanglement with immigration enforcement can deter victims and witnesses from reporting state crimes and divert limited resources from other activities that the legislature has determined will better protect local public safety.”

In the 1st Circuit case, the Trump administration tried to use money as leverage. Because the federal government cannot command states and localities to take action, it made grants from the Edward Byrne Memorial Justice Assistance Grant Program conditional on cooperation. That endangered grants to two Rhode Island cities with sanctuary policies: Providence ($212,112) and Central Falls ($28,677).

As Selya wrote in the Boston-based 1st Circuit opinion: “The cities view their sanctuary policies as consistent with the best traditions of a free and open society. The DOJ, however, views those policies as antithetic to its efforts to enforce a series of validly enacted immigration-related laws.”

He concluded: “We need not plunge into these troubled waters.”

The problem for the DOJ, he said, is that Congress simply didn’t give the department the authority to make such demands part of the grant process, in which the money is a formula of population and crime statistics.

Selya’s court joined appeals courts in San Francisco, Chicago and Philadelphia that reached similar conclusions. But an appeals court in New York went the other way, saying broad language elsewhere in the law gives the department sway in forcing cooperation.

Such splits usually are the required ingredient to compel Supreme Court intervention.

The briefs in the California case say the broader issue is the relationship between the federal government and the states. It has produced some surprising allegiances.

California notes that the 10th Amendment restrains Congress’s ability to impose its will upon the states directly. Under what the Supreme Court calls the “anticommandeering” doctrine, the federal government may not directly compel states to enact a regulation or enforce a federal regulatory program.

Becerra cites Justice Antonin Scalia’s 1997 opinion that said a sheriff in Montana could not be compelled to conduct background checks for gun purchases under the Brady Act.

But Francisco counters that immigration is different. He relies in part on the court’s 2012 decision that struck down an Arizona law that prescribed an active role for local police in detaining undocumented immigrants. The court’s liberal justices prevailed in that case, saying immigration was a federal matter.

That should apply to California as well, Francisco writes:

“California has no more right to obstruct federal law by adopting policies governing the regulation of aliens in one way than Arizona had to obstruct federal law by adopting policies governing the regulation of aliens in another way.”