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

President Donald Trump's personal attack on the federal judge who blocked his controversial travel executive order could undermine public confidence in an institution capable checking his power, say legal experts.

The fallout from Trump's Twitter tirade against U.S. District Judge James Robart — in which he dismissed a respected jurist as a "so-called judge" — continues to dog the new president.

"The concern is that repeated attacks on individual judges could diminish the confidence that people have that judges are ruling on cases in accordance with the law," University of Pittsburgh Law Professor Arthur Hellman told NBC News.

"You can disagree with a judge's conclusion, but judges reach their conclusions based on the arguments from both sides," Hellman said. "To personalize it and make it seem like the judge is doing it for no good reason is troubling."

U.S. District Judge James Robart. NBC News

Trump went on a Twitter tear on Saturday a day after Robart issued a ruling that blocked the president's executive order, which temporarily put the kibosh on travel for many people from seven mostly Muslim countries.

Hellman said he would not go so far as to suggest that Trump's tweets were "part of a premeditated plan to undermine institutions that could make it difficult for him to carry out his policies."

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

"My sense is this is a president who lashes out at people," Hellman said. "He is extraordinarily thin-skinned, and he personalizes everything. I really hate to say this about a president, but he doesn't seem to understand judicial function. He portrays judges as acting on their personal instincts and desires instead of the law."

Eric Posner, a law professor at the University of Chicago, somewhat agreed.

"I don't know whether he deliberately wants to delegitimize the courts," Posner said in an email to NBC News. "It is possible he lashed out in an unthinking way. But certainly the effect is to damage public confidence in the judicial system."

The opinion of this so-called judge, which essentially takes law-enforcement away from our country, is ridiculous and will be overturned! — Donald J. Trump (@realDonaldTrump) February 4, 2017

Northwestern University Law Professor Ron Allen said Trump's anti-Robart tweets should also be troublesome "for the people who support him."

"He may go down in history as somebody who ran a brilliant campaign but disgraced himself in office," Allen told NBC News. "The 'so-called judge' insult was just stupid and reflects badly on his knowledge of the legal system."

"The other stupidity here is if he thinks he can browbeat the federal courts he's badly mistaken," Allen added. "If the courts think the president is trying to intimidate them, they will, as my father used to say, circle the wagons. The effect for Trump is likely to be very counterproductive."

Harvard Law Professor Jack Goldsmith said on his blog that Trump's order actually has a "surprisingly strong basis in law but was issued in haste, without proper inter agency coordination, without proper notice, without adequate consideration of its implications."

But, Goldsmith added, Trump's aggressive tweets "will certainly backfire."

"The tweets will make it very, very hard for courts in the short term to read immigration and constitutional law, as they normally would, with the significant deference to the President's broad delegated powers," he wrote.

And yet, having a judge strike down the executive order might have been exactly what Trump was aiming for, Goldsmith wrote — "assuming that he is acting with knowledge and purpose."

"The only reason I can think of is that Trump is setting the scene to blame judges after an attack that has any conceivable connection to immigration," Goldsmith wrote.

So if Trump "loses in court he credibly will say to the American people that he tried and failed to create tighter immigration controls. This will deflect blame for the attack."

This is not the first time Trump has gone after a federal judge. During the campaign, he claimed that U.S. District Judge Gonzalo Curiel, who was presiding over the fraud case against Trump University, could not give him a fair hearing because he is "Mexican."

Curiel is of Mexican descent but was born in Indiana. And Trump, who launched his campaign vowing to build a wall on the Mexican border to keep out "rapists" and other criminals, wound up settling a case that he had vowed to fight forever for $25 million after winning the election in November.