President Trump on Wednesday accused political opponents of “judge shopping” in their bid to block some of his signature executive orders and vowed to take his case to the Supreme Court – after a federal judge blocked his attempt to cut off sanctuary city funding.

That ruling, and another suspending his ban on travel from certain majority-Muslim countries, both involved federal judges in California. The San Francisco-based Ninth Circuit Court of Appeals in February upheld a Hawaii judge's ruling against the travel ban. A District Court judge also based in northern California said Tuesday the Trump administration couldn’t threaten to take away funding from cities that have policies favorable to illegal immigrants. If appealed, the case will go to the Ninth Circuit.

“First the Ninth Circuit rules against the ban & now it hits again on sanctuary cities-both ridiculous rulings. See you in the Supreme Court!” Trump wrote in the first of a series of morning tweets. “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%).”

“They used to call this ‘judge shopping!’ Messy system.”

The Supreme Court reversed 79 percent of the 9th Circuit’s cases from 2010-2015, the third highest rate of any circuit court, according to Politifact.

The White House press office piled on, issuing a scathing indictment of the court, declaring “the rule of law suffered another blow” with the Tuesday ruling. The issuing of the statement, which originated from the Office of the Press Secretary, coincided with Trump’s tweets.

REPUBLICANS PUSH BILL TO SPLIT UP 'NUTTY 9th CIRCUIT'

"They used to call this 'judge shopping!' Messy system." — President Trump

“Once again, a single district judge – this time in San Francisco – has ignored Federal immigration law to set a new immigration policy for the entire country. This decision occurred in the same sanctuary city that released the 5-time deported illegal immigrant who gunned down innocent Kate Steinle in her father's arms,” the statement said, referring to the July 2015 death of Steinle which has been cited by Trump numerous times.

“San Francisco, and cities like it, are putting the well-being of criminal aliens before the safety of our citizens, and those city officials who authored these policies have the blood of dead Americans on their hands.”

Judge William Orrick’s ruling to halt Trump’s order on sanctuary cities instituted a nationwide injunction to stay in place while other pending lawsuits move forward.

In his decision, Orrick said the plaintiffs were likely to succeed and criticized the order as too broad, saying it potentially threatens to cut off a wide range of federal grants to targeted cities.

"And if there was doubt about the scope of the order, the president and attorney general have erased it with their public comments," he said.

The judge further said that federal funding "bears no meaningful relationship to immigration enforcement" and "cannot be threatened merely because a jurisdiction chooses an immigration enforcement strategy of which the president disapproves."

The judge clarified that the injunction “does not impact the Government’s ability to use lawful means to enforce existing conditions of federal grants … nor does it restrict the Secretary from developing regulations or preparing guidance on designating a jurisdiction as a 'sanctuary jurisdiction.'”

Fox News’ Bill Mears contributed to this report.