President Donald Trump lashed out again at the American judiciary for blocking a piece of his agenda.

Except on Wednesday, he got his court wrong.

In a morning tweet, he blamed the 9th Circuit Court of Appeals for blocking his order to withhold funding from so-called sanctuary cities. He called the ruling "ridiculous" and signaled that his administration will appeal by saying "see you in the Supreme Court."

Trump tweet: First the Ninth Circuit rules against the ban & now it hits again on sanctuary cities-both ridiculous rulings. See you in the Supreme Court!

The problem: Tuesday's ruling did not come from the 9th Circuit. It was made in federal district court in San Francisco.

Earlier this year, the 9th Circuit did block Trump's executive order restricting travel from several predominantly Muslim countries.

White House chief of staff Reince Priebus also targeted the appeals court in comments to reporters Tuesday, according to The Hill.

Politico, which first pointed out Trump's error, noted that the 9th Circuit would hear the case next if the Trump administration appeals.