A federal judge has ruled in favor of Portland and Seattle in a case against President Trump's executive order barring sanctuary cities from receiving federal funds.

The ruling Wednesday by Western District of Washington Judge Richard A. Jones follows an opinion from the Ninth U.S. Circuit Court of Appeals in August that rendered unconstitutional a section of Trump's executive order declaring sanctuary cities ineligible for federal grants.

Trump signed the order in Jan. 2017, five days after taking office; the section invalidated by the appeals court attempted to punish local governments that don't cooperate with federal immigration authorities. That ruling applied only to application of the funding ban in San Francisco. At the time of the appeals court ruling, the U.S. Department of Justice called the decision a "victory for criminal aliens."

In Seattle, Jones, a George W. Bush appointee, wrote in his two-page order that attorneys for Portland, Seattle and the federal government agreed ruling in favor of the two Northwest sanctuary cities is "appropriate" in light of the appeals court findings.

"This is a clear victory for the city of Portland and the rule of law," Portland Mayor Ted Wheeler said in a statement Thursday.

The three-member panel of appeals court judges did not invalidate Trump's executive order nationwide, and found a lower court went too far by doing so.

Those judges ruled federal grants may legally be withheld from sanctuary jurisdictions, but only by Congress, not the executive branch. The Seattle judge applied the same rationale in favor of Seattle and Portland.

Portland is a sanctuary city, but that has little effect on law enforcement policy because Oregon has long been a sanctuary state. Oregon voters will decide a Nov. 6 a ballot measure that would repeal the sanctuary state law.

-- Gordon R. Friedman