Three months ago, Donald Trump assumed a presidency which, for more than a century, had grown seemingly endless discretionary powers. And he did so in company with Republican majorities in Congress and in 32 state legislatures - all of which should have made his decisions unassailable.

Instead, he has been stymied and embarrassed by resistance from a federal judiciary that has twice halted executive orders on the most prominent issue of his presidential campaign. So, will the federal judiciary become the wall against which Trump bleeds away the power, not just of his own presidency, but of the "imperial presidency" we have watched a-building since the days of Teddy Roosevelt?

Trump certainly would not be the first president to go to war with federal judges.

As early as 1801, Thomas Jefferson was infuriated to find that his predecessor had signed commissions for a raft of federal judgeships on his last day in office. Jefferson refused to deliver the commissions. But one of these judges, William Marbury, filed suit directly in the U.S. Supreme Court. The court denied the suit on a technicality, but it insisted that Marbury nevertheless had "legal right to the office." Jefferson had no choice but to submit.

However, only 30 years later, it was the president who won.

Andrew Jackson was determined to evict the Cherokee tribe from its homeland in Georgia, waving aside a history of treaties with the Cherokee nation. Chief Justice John Marshall agreed that Jackson had no authority over the Cherokee, who were "distinct, independent political communities retaining their original natural rights." But Jackson only snorted, "John Marshall has made his decision; let him enforce it." In 1838, Jackson had the Cherokees forcibly removed to modern-day Oklahoma in an eviction now known as "The Trail of Tears."

Abraham Lincoln faced a similar difficulty with the Supreme Court in 1861, and adopted the same solution.

Riots in the streets of Baltimore led Lincoln to impose martial law and suspend the writ of habeas corpus. Chief Justice Roger Taney tried to restrain Lincoln's order in ex parte Merryman, arguing that the Constitution gave Congress, not the president, the authority to suspend the writ. Lincoln's response, however, was simply to ignore Taney, and by 1862, Lincoln had suspended habeas corpus throughout the country.

Then, of course, there is Franklin Roosevelt and his "court-packing" plan. Stymied by repeated decisions of the Supreme Court that blocked his New Deal legislation, Roosevelt threatened the court with the Judicial Procedures Reform Bill of 1937, which allowed him to "pack" the court with six additional justices. The court beat an undignified retreat, and eventually, over the next three years, Roosevelt was able to fill existing seats on the court with justices friendly to the New Deal.

If Jackson, Lincoln, and Roosevelt are any example, the powers of the judiciary to block presidential actions are far less absolute than they seem.

It has not been only the judicial and executive branches that have been in conflict.

In Chisholm v. Georgia in 1793, the Supreme Court declared that citizens of other states could sue the state of Georgia. The state legislatures howled in protest, and in 1798, Congress proceeded to adopt an 11th amendment to the Constitution, preventing the federal judiciary from claiming authority in "any suit in law ... against one of the United States by Citizens of another State." In the dark years of Reconstruction, the Supreme Court and Congress see-sawed back-and-forth in passing, and then invalidating, civil rights laws.

We often speak of the three federal branches - executive, legislative, judicial - as though they occupied three independent silos, based on the constitutional separation of powers. But the separation of powers is by no means absolute in the Constitution; it is, after all, Congress which has structured the judiciary by statute since 1790 and it is the president who nominates federal judges to their benches. And it was only in the last half of the 20th century that the federal judiciary solidified its status as the last word on American law.

The current controversy over immigration may not be the best issue for the federal judiciary to choose for a fight with the president. Congress has delegated authority to the president to "suspend the entry of all aliens or any class of aliens as immigrants or nonimmigrants, or impose on the entry of aliens any restrictions he may deem to be appropriate." On the other hand, there are no guarantees that presidents can force the judiciary to back away. Jefferson's humiliation over the Marbury suit was the beginning of a downward spiral in presidential authority at the hands of the judiciary, which did not stop until Jefferson left office. Franklin Roosevelt's judicial "reform" plan died in Congress, and cost him serious public support.

The early signs from the Ninth Circuit's defiance of President Trump suggest that newly emboldened judges will move even more aggressively to block presidential orders. It is impossible to predict who is likely to emerge as the winner in such a face-off.

The Ninth Circuit has a reputation for over-reach that, in its collision with Trump, could impair the reputation of the entire federal judiciary. But it is also possible that the most famous deal-maker president could become the means through which the imperial presidency becomes a little less regal.

Allen C. Guelzo is a professor of history at Gettysburg College and a senior fellow of the Claremont Institute.

James H. Hulme is a practicing attorney in Washington, D.C.