Trump suggests he'll take sanctuary cities case to Supreme Court

A federal judge ruled that funding may not be withheld from sanctuary cities.

Later today, Trump expressed similar sentiments after signing an unrelated executive order at the Department of Interior.

Asked whether he was surprised by Tuesday's ruling, he said, "I'm never surprised by the 9th Circuit. As I said, we'll see them in the Supreme Court."

The ruling, by Judge William Orrick, blocks part of Trump's executive order on immigration enforcement that he signed in January; it read, "Jurisdictions that fail to comply with applicable federal law do not receive federal funds, except as mandated by law."

Despite Trump's pointing to the 9th Circuit, Orrick actually sits on the U.S. District Court for the Northern District of California. Appeals of cases there go to the U.S. 9th Circuit Court.

San Francisco and Santa Clara County filed the lawsuit, arguing that billions of dollars in funding are at risk.

"Out of our very big country, with many choices, does everyone notice that both the 'ban' case and now the 'sanctuary' case is brought in the Ninth Circuit, which has a terrible record of being overturned (close to 80%)," Trump wrote over two tweets.

"They used to call this 'judge shopping!' Messy system," Trump wrote, referring to the common practice of filing similar lawsuits in different jurisdictions in hopes of getting a sympathetic judge.

Trump's tweets echo a White House statement released Tuesday night after Orrick's ruling.

ABC News' Alexander Mallin and Julia Jacobo contributed to this report.