A federal judge ruled Tuesday that the Trump administration cannot withhold federal funds from jurisdictions that limit their cooperation with immigration authorities, commonly known as sanctuary cities.

U.S. District Judge William Orrick issued his temporary ruling as a result of a lawsuit brought against the administration by the city of San Francisco and the county of Santa Clara. The jurisdictions had argued that billions of federal dollars that support vital services were in jeopardy when the administration threatened to cut all federal funds.

Trump had made his threat a keystone promise of his presidential campaign. Just last week Attorney General Jeff Sessions underscored that threat by warning eight jurisdictions that they ran the risk of losing federal funds if they didn’t help enforce federal immigration law.

But the scope of that threat has been in dispute.

In a recent court hearing, attorneys for Santa Clara and San Francisco clashed with a Justice Department lawyer who argued that the lawsuit against the administration was premature because no enforcement action has been taken.

Chad Readler, acting assistant attorney general, said the funding cutoff threat pertained only to money granted by the Justice Department and Homeland Security.

Judge Orrick sided with the jurisdictions who argued that the administration has clearly targeted all federal funding. Orrick wrote, “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.”

Copyright 2017 NPR. To see more, visit http://www.npr.org/.