SAN FRANCISCO (AP) — A federal judge on Tuesday blocked President Donald Trump's attempt to withhold funding from "sanctuary cities" that do not cooperate with U.S. immigration officials, saying the president has no authority to attach new conditions to federal spending. U.S. District Judge William Orrick issued the preliminary injunction in two lawsuits — one brought by the city of San Francisco, the other by Santa Clara County — against an executive order targeting communities that protect immigrants from deportation. The injunction will stay in place while the lawsuits work their way through court. The judge rejected the administration's argument that the executive order applies only to a relatively small pot of money and said Trump cannot set new conditions on spending approved by Congress. Even if the president could do so, those conditions would have to be clearly related to the funds at issue and not coercive, as the executive order appeared to be, Orrick said. "Federal funding that bears no meaningful relationship to immigration enforcement cannot be threatened merely because a jurisdiction chooses an immigration enforcement strategy of which the president disapproves," the judge said. It was the third major setback for the administration on immigration policy. White House chief of staff Reince Priebus described the ruling as another example of the "9th Circuit going bananas.Read more on NewsOK.com