A federal judge has permanently blocked President Trump’s executive order to cut funding from cities that limit cooperation with U.S. immigration authorities.

U.S. District Court Judge William Orrick issued the ruling Monday in lawsuits brought by two California counties: San Francisco and Santa Clara.

Orrick said Trump cannot set new conditions on spending approved by Congress. The judge had previously put a temporary hold on the executive order targeting so-called sanctuary cities.

The Trump administration has appealed that decision to the 9th U.S. Circuit Court of Appeals. The administration has also moved to withhold one particular law enforcement grant from sanctuary cities, prompting a new round of lawsuits.