In his business career, Donald Trump faced hundreds of lawsuits and boasted of his ability to win cases in court. But as President of the United States, he is discovering the power of the legal system to frustrate his plans.

On Thursday, a federal appeals court delivered a major setback to Mr. Trump's bid to reinstate his controversial immigration ban, denying the request in sometimes stinging terms. Mr. Trump, for his part, called the ruling "disgraceful" and proclaimed "see you in court" on Twitter.

The White House said on Friday that it was reviewing all of its legal options, including a potential appeal to the Supreme Court, according to The Washington Post. Meanwhile, Mr. Trump said that he might sign a "brand new" executive order on immigration, a step that would seek to render the ban more immune to challenge.

Story continues below advertisement

Like presidents before him, Mr. Trump is coming face to face with the limits to his authority. In Mr. Trump's case, the challenge is coming from an assertive judiciary branch of government, rather than from the legislature, where both houses are controlled by his own party.

But unlike his predecessors, Mr. Trump has launched a series of scathing and sometimes personal attacks on the legitimacy of judges who get in his way.

During the presidential campaign, Mr. Trump asserted that a federal judge's Mexican heritage prevented him from doing his job. And Mr. Trump described another member of the bench as a "so-called judge" who would bear blame for future terrorist attacks after he issued a ruling blocking the immigration ban on Feb. 3.

"You have presidents who tangle with the judiciary in all kinds of ways," said Peter Spiro, a law professor at Temple University, but recent presidents tended to so in a manner that was "very conscious of the boundaries."

Mr. Trump, by contrast, seems to have no such limitations. What's more, his outbursts against the judiciary are likely to prove counterproductive. "The best way to get the courts to rule against you is to attack the legitimacy of the courts," Prof. Spiro said.

Mr. Trump is already facing abundant legal challenges to his early moves as President. More than 50 lawsuits have been filed targeting Mr. Trump or his administration, according to an analysis by National Public Radio – roughly 10 times the number that were filed against former presidents Barack Obama and George W. Bush at the same point in their tenures.

The vast majority of the cases are connected to the immigration ban, whose messy drafting and chaotic rollout leaves it ripe for challenge, experts say (according to a report Friday from NBC News, one option the White House is pursuing is rewriting the order so that it will better withstand legal scrutiny).

Story continues below advertisement

But Mr. Trump's other executive orders will also face tests in court. A handful of lawsuits are challenging aspects of his directives on immigration. One case launched by the city of San Francisco takes aim at Mr. Trump's threat to cut funding to so-called "sanctuary" cities, or jurisdictions which limit local co-operation with federal immigration enforcement.

Another lawsuit targets Mr. Trump's recently signed directive that the government must scrap two federal regulations for each new one that is instituted. Yet another case targets Mr. Trump's conflicts of interest, alleging that he is in violation of a constitutional clause barring the president from receiving presents or forms of profit from foreign governments.

Mr. Trump's willingness to engage in legal combat in his business career is scant preparation for the pushback he faces in his new job, say experts. "We're talking about the separation of powers, we're not talking about [real estate] subcontractors," Carl Tobias, a professor at the University of Richmond and an expert on constitutional law, said.

It's unusual, if not unprecedented, for a president to become embroiled in a high-profile battle with the judiciary so soon after taking office. In the case of the immigration ban, that battle may be decided in the Supreme Court. Former president George W. Bush experienced several defeats on national-security matters in the country's highest court, but only several years into his administration, noted Chris Edelson, a professor of government at American University.

Prof. Edelson said there are a handful of famous cases where courts have thwarted a president's efforts to overreach his authority. In 1952, during the Korean War, president Harry Truman told the Commerce Department to seize steel factories, but was blocked by the Supreme Court. In 1974, after president Richard Nixon tried to stymie the Watergate investigation, the Supreme Court delivered a unanimous rebuke, which helped prompt Mr. Nixon's resignation.

In such confrontations, the legislative branch and public opinion play a critical role, Prof. Edelson said. "It's often framed as the president versus the courts, but it's really the president, the courts and Congress," he said.

Story continues below advertisement

"I get nervous about the court being out there on its own" in any future showdowns with Mr. Trump, he added. "It's essential for Congress to weigh in, and I haven't seen any tangible evidence of Congress saying, 'No.'"