Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

President Donald Trump is bashing a federal judge's decision that blocked part of his executive order on sanctuary cities — vowing to challenge the ruling in the U.S. Supreme Court.

In a series of early Wednesday morning tweets, Trump blamed the 9th U.S. Circuit Court of Appeals for striking down, at least temporarily, his revised travel ban restricting certain immigration. Then, he added, the same court "hits again on sanctuary cities - both ridiculous rulings."

First the Ninth Circuit rules against the ban & now it hits again on sanctuary cities-both ridiculous rulings. See you in the Supreme Court! — Donald J. Trump (@realDonaldTrump) April 26, 2017

The federal judge who blocked Trump's crackdown on sanctuary cities, William Orrick III, is based in San Francisco and part of the U.S. District Court for the Northern District of California. Any ruling he makes is appealed to the 9th Circuit, which had no part in Orrick's decision as Trump suggested. Orrick doesn't sit on the 9th Circuit.

The president, however, went on to question the validity of that court.

The Morning Rundown Get a head start on the morning's top stories. This site is protected by recaptcha

Related: Court Blunts Trump’s Sanctuary Cities Crackdown

"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%)," he tweeted. "They used to call this 'judge shopping!' Messy system."

PolitiFact found in February that the 9th Circuit does have a higher than average reversal rate of 79 percent, which is the third highest of all circuit appeals courts in the country.

But PolitiFact said that it would be unfair to criticize the quality of the 9th Circuit's decisions because of how big it is — covering the western United States, as well as Alaska and Hawaii — and the fact that a small handful of its cases actually reach the Supreme Court.

For instance, the 9th Circuit saw 12,000 cases filed in the year leading up to March 31, 2015. The Supreme Court heard just 11 cases from the 9th Circuit that same year, PolitiFact said, and overturned eight of them.

Orrick's ruling on Tuesday knocks down Trump's Jan. 25 order that cities that shield undocumented immigrants from federal authorities would become ineligible to receive federal grants. The nationwide injunction was in response to a lawsuit filed by San Francisco and nearby Santa Clara County.

White House Press Secretary Sean Spicer on Tuesday blasted the "single district judge" for wanting to override the administration's immigration policy for the entire country.

"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," Spicer said in a statement.

The 9th Circuit, meanwhile, is set to hear the Trump administration's appeal in May of his so-called travel ban — a revised executive order that blocks certain travelers from six Muslim-majority nations. That order had been halted by a federal judge in Hawaii, which prompted Attorney General Jeff Sessions to say last week that he was "amazed that a judge sitting on an island in the Pacific can issue an order that stops the President of the United States from what appears to be clearly his statutory and Constitutional power."

After the backlash, Sessions chuckled on ABC's "This Week," saying, "Nobody has a sense of humor anymore."