After signing an executive order on April 26, President Trump was asked about the ruling halting his sanctuary city order. "I'm never surprised by the 9th Circuit," he said to laughter. "As I said, we'll see them in the Supreme Court." The federal judge who issued the ruling is not on the U.S. 9th Circuit Court of Appeals, although those judges would review his decisions. (The Washington Post)

Dealing with another legal blow that blocked another executive order this week, President Trump did something familiar.

He attacked the judiciary. Again. And ever so aggressively.

A White House statement Tuesday about a federal district judge's ruling on Trump's executive order on “sanctuary cities” did not mince words. It emphasized — more than once — that the judge who just ruled against the administration is not an elected official.

“The San Francisco judge's erroneous ruling is a gift to the criminal gang and cartel element in our country, empowering the worst kind of human trafficking and sex trafficking, and putting thousands of innocent lives at risk,” the statement said. “This case is yet one more example of egregious overreach by a single, unelected district judge.”

On Tuesday, U.S. District Judge William H. Orrick in San Francisco blocked the Trump administration from withholding federal funding from “sanctuary” jurisdictions — cities or towns that refuse to cooperate with immigration authorities.

The tweet storm from the president came early the following day, when Trump lashed out at the wrong court, the U.S. Court of Appeals for the 9th Circuit, which he said had issued a “ridiculous” ruling.

The 9th Circuit had previously ruled against Trump's original travel ban barring citizens from seven predominantly Muslim countries and refugees from entering the United States. But the ruling on “sanctuary cities” was issued by the U.S. District Court for California's Northern District. The federal appellate court, however, is likely to hear an appeal on Orrick's ruling.

Trump vowed to take the case to the country's highest court.

“I'm never surprised at the 9th Circuit,” the president said Wednesday when asked about the ruling halting his sanctuary-city order, again referring to the wrong court. “As I said, we'll see them in the Supreme Court.”

Charles Geyh, an Indiana University law professor with expertise on judicial conduct and ethics, said Trump is sending a dangerous message in his latest attack on the judiciary: “As the leader of the free world, I should be able to do what I choose. The court shouldn't be able to get involved.”

Geyh said that attitude shows a lack of understanding of the equal roles of the three branches of government, specifically of the judiciary's job to serve as a check on the executive branch.

“Presidents have disagreed with court rulings all the time. What's unusual is he's essentially challenging the legitimacy of the court's role. And he's doing that without any reference to applicable law,” Geyh told The Washington Post. “That they are blocking his order is all the evidence he needs that they are exceeding their authority.”

“That's worse than wrong,” Geyh added. “On some level, that's dangerous.”

Trump has largely lost in legal battles over his administration's immigration policies. And with almost each unfavorable ruling, Trump has responded aggressively.

In February, he ripped into a Washington state federal judge who temporarily blocked enforcement of his travel ban. U.S. District Judge James L. Robart wrote that the court is “one of three equal branches of our federal government.”

In a Saturday morning tweet storm after Robart's ruling, Trump said, “The opinion of this so-called judge, which essentially takes law-enforcement away from our country, is ridiculous and will be overturned.”

Trump's attacks on the judiciary, specifically on Robart, even brought a response from his own Supreme Court nominee, now-Justice Neil M. Gorsuch, who told a senator that the criticism was “disheartening” and “demoralizing” to independent federal courts, The Post reported.

But a few days later, Trump criticized the judiciary again after watching an oral argument in which three 9th Circuit judges hearing an appeal on Robart's ruling aggressively questioned the government's lawyers.

“And I don't ever want to call a court biased, so I won't call it biased. And we haven't made a decision yet,” Trump said. “But courts seem to be so political, and it would be so great if our justice system — if they would be able to read a statement and do what's right.”

The 9th Circuit, which has jurisdiction over district courts in several West-Coast states, unanimously upheld Robart's ruling and rejected the government's argument that the travel ban serves any national security purpose. Echoing Robart, the appeals court judges asserted the judiciary's ability to check the president's power.

The president angrily tweeted minutes after the ruling was issued: “SEE YOU IN COURT, THE SECURITY OF OUR NATION IS AT STAKE!”

Later, in March, Trump blasted two federal judges in Hawaii and Maryland who had blocked a watered-down version of his travel ban. He called the Hawaii judge's ruling “terrible” during a rally in Nashville and said it was politically motivated.

Trumps's attacks on the federal judiciary began even before he took office.

U.S. District Judge Gonzalo Curiel was the target of racially tinged remarks by the Republican presidential nominee last June. In an interview with the Wall Street Journal, Trump said that Curiel's ethnicity should have disqualified him from presiding over fraud lawsuits against the now-defunct Trump University. He argued that because of his hard-line immigration policies, having a judge of Mexican heritage preside over a lawsuit against him presented an “absolute conflict” of interest.

“I have a judge who is a hater of Donald Trump, a hater. He's a hater,” Trump said at a campaign rally in San Diego in June 2016, after Curiel ordered the release of internal documents detailing predatory marketing practices at Trump University. “They ought to look into Judge Curiel because what Judge Curiel is doing is a total disgrace. Okay?”

Although Trump agreed to pay $25 million to settle those lawsuits, his administration is facing Curiel again. The Indiana-born judge is presiding over a California lawsuit filed on behalf of a young man whom immigration advocates say is one of the first “Dreamers” to be deported under Trump.

Maria Sacchetti contributed to this report.

READ MORE:

A judge rules Trump may have incited violence … and Trump again has his own mouth to blame

Appeals court judges rebuke Trump for ‘personal attacks’ on judiciary, ‘intimidation’