WASHINGTON ― The morning after a federal judge temporarily blocked enforcement of a travel ban targeting seven Muslim-majority countries, President Donald Trump did what he often does when faced with a challenge: He launched a personal attack on Twitter at someone he saw as an opponent.

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

In his first public response to the nationwide halt of his week-old executive order, Trump appeared to suggest that U.S. District Judge James Robart of the Western District of Washington, who was appointed by a Republican president, wasn’t legitimate and that his decision would soon be made irrelevant.

That kind of comment from a sitting president, legal experts warned, could lead to a constitutional crisis by eroding the independence of the judiciary and signaling to government agencies that they should ignore legal decisions that clash with the president’s agenda.

“Already, the court of appeals will need to worry that if it rules against Judge Robart (as perhaps it should, on the legal merits), it will validate Trump’s attack on the judiciary in the public mind,” Eric Posner, a law professor at the University of Chicago, wrote on Saturday. “If it does not,” Posner continued, “the court of appeals will be seen as a partisan enemy of the president.”

In fact, late on Saturday night, the White House was dealt another blow when a U.S. appeals court denied a Department of Justice request to immediately restore the president’s travel ban.

White House press secretary Sean Spicer said in a statement on Friday night that the Justice Department will seek an emergency stay “of this outrageous order.” Spicer issued a nearly identical statement on Saturday morning ― but cut the word “outrageous” from the later version.

Update: WH sent out a new statement that removes the word "outrageous" pic.twitter.com/342RqHiJLa — Jessica Schulberg (@jessicaschulb) February 4, 2017

If Spicer was concerned about the optics of the executive branch publicly feuding with the judiciary, it appears he was unable to sway his boss. Hours later, Trump sent tweets bashing Robart’s decision as “ridiculous” and “terrible.” Because of the judge, Trump wrote, “many very bad and dangerous people may be pouring into our country.”

What is our country coming to when a judge can halt a Homeland Security travel ban and anyone, even with bad intentions, can come into U.S.? — Donald J. Trump (@realDonaldTrump) February 4, 2017

Because the ban was lifted by a judge, many very bad and dangerous people may be pouring into our country. A terrible decision — Donald J. Trump (@realDonaldTrump) February 4, 2017

The judge opens up our country to potential terrorists and others that do not have our best interests at heart. Bad people are very happy! — Donald J. Trump (@realDonaldTrump) February 5, 2017

In addition to placing judges in a politically fraught situation, the president’s Twitter rant may “embolden Trump loyalists in the executive branch of the government to disregard judicial orders,” Posner warned.

That type of scenario may already be unfolding. Earlier this week, several members of Congress and attorneys accused Customs and Border Patrol agents of continuing to detain travelers from the seven banned countries, even after federal judges in New York, Virginia, and Massachusetts ordered a temporary halt on deporting individuals who had already arrived in the U.S. with visas.

It’s not unheard of for sitting presidents to make known their disagreements with judicial decisions. In his 2010 State of the Union speech, former President Barack Obama accused the Supreme Court of opening “the floodgates for special interests” after the court loosened campaign spending rules in the Citizens United case, noted Laurence Tribe, a constitutional law professor at Harvard University. But even then, Obama avoided criticizing any particular judge, did not challenge the legitimacy of the the decision, and prefaced his statement with a nod at the importance of the separation of powers.

“To single out an individual judge and accuse him crudely of not being worthy of his judicial robes may well be unprecedented or, as Trump might say, unpresidented,” Tribe said, mocking the president for a spelling error in a December tweet.

“Even [former President Abraham] Lincoln was pretty respectful of [Chief Justice Roger] Taney,” Posner wrote in an email, referring to the former Supreme Court justice who delivered the majority opinion in the 1857 Dred Scott case, which said people of African ancestry couldn’t be U.S. citizens.

Saturday wasn’t the first time Trump tried to discredit a judge. In June, during the presidential campaign, he attacked Judge Gonzalo Curiel, a federal jurist overseeing lawsuits against Trump University. Trump, who previously had called Mexicans criminals, said that Curiel, who was born in Indiana, was not capable of doing his job because of his Mexican heritage.

“It fits a troubling pattern of Trump treating those who disagree with him with contempt,” said Geoffrey Stone who teaches law at the University of Chicago. “Such bullying behavior is juvenile and ultimately dangerous to our democracy.”

Even some of Trump’s political allies seemed concerned when he went after Curiel. House Speaker Paul Ryan (R-Wis.) said Trump’s criticism was “the textbook definition of a racist comment,” but continued to support his presidential candidacy.

Ryan did not immediately respond to a request for comment about Trump’s new spat with a federal judge, which carries significantly greater weight now that Trump is the president.

As of Saturday evening, the only lawmakers to criticize Trump’s attack on Robart were Democrats.

“The President’s hostility toward the rule of law is not just embarrassing, it is dangerous,” Sen. Patrick Leahy (D-Vt.) said in a statement on Saturday. “He seems intent on precipitating a constitutional crisis.”

Sign up for the HuffPost Must Reads newsletter. Each Sunday, we will bring you the best original reporting, long form writing and breaking news from The Huffington Post and around the web, plus behind-the-scenes looks at how it’s all made. Click here to sign up!