A United States judge on Tuesday blocked President Donald Trump’s attempt to withhold federal funding from “sanctuary cities” that do not cooperate with the country’s immigration officials. Judge William H Orrick of the Northern District of California ruled that the president did not have the authority to attach new conditions to federal funding already approved by the Congress, Reuters reported.

“Sanctuary cities” is a loosely defined term for jurisdictions that do not comply with immigration authorities. Before assuming office on January 20, Trump had said he will choke the cities’ funds.

Orrick issued the preliminary injunction in two lawsuits – one brought by the city of San Francisco and 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 Trump administration’s argument that the executive order applies only to a relatively small amount of money. “Federal funding that bears no meaningful relationship to immigration enforcement cannot be threatened merely because a jurisdiction chooses an immigration enforcement strategy the president disapproves,” Orrick observed.

White House Chief of Staff Reince Priebus said the government will appeal against the ruling. “The idea that an agency cannot put in some reasonable restrictions on how some of these monies are spent is something that will be overturned eventually,” he said.

Earlier, two federal judges had suspended Trump’s executive orders that restricted travel from several Muslim-majority countries. The government has appealed those decisions.