A woman offered legal services at Los Angeles International Airport before the travel ban was lifted. (Reed Saxon / AP)

Any way you slice it, President Donald Trump got his posterior handed to him last week by a three-judge panel of the 9th U.S. Circuit Court of Appeals over his “Muslim travel ban.” And the whole world watched as the legal butt-thumping unfolded, step by courtroom step, and Trump received his first—but by no means his last—lesson in the time-honored principle of judicial review.

First came the lawsuit filed on Jan. 30 by the states of Washington and Minnesota, which alleged that the travel ban—formally known as Executive Order (EO) No. 13769 and titled “Protecting the Nation From Foreign Terrorist Entry Into the United States”—was illegal under both the due process clause of the Fifth Amendment and the establishment clause of the First Amendment, as well as on various statutory grounds. The states also claimed that the EO wasn’t really meant to protect against terror attacks by foreign nationals but was actually the first iteration of the “Muslim ban” that Trump during the presidential campaign had promised to enact.

Signed on Jan. 27, the EO barred citizens of seven predominantly Muslim nations (Iran, Iraq, Sudan, Libya, Yemen, Syria and Somalia) from entering the U.S. for 90 days. The edict also suspended the entire U.S. refugee admission program for 120 days and barred the entry of Syrian refugees indefinitely. Upon resumption of the refugee program, the EO authorizes the secretary of state to prioritize claims based on assertions of religious persecution in cases where refugees are members of a religious minority in their homelands—predominantly, Christians in the seven targeted countries.

The EO plunged the international air traffic system into outright chaos as airlines and the Department of Homeland Security struggled to understand its sweeping language and implement the travel bans it imposed. At least 109 people were detained at U.S. airports, in some instances for more than 30 hours, as a result of the ban, and more than 60,000 travel visas previously delivered were summarily revoked. The detainees included a 5-year-old U.S. citizen, a boy who was handcuffed and separated from family members as a security risk at Dulles International Airport because he was re-entering this country from Iran.

Step two in Trump’s legal beat down came three days later, on Feb. 3 , when federal District Court Judge James L. Robart, sitting in Seattle, announced his ruling, suspending the EO. Although other federal judges in Massachusetts, New York and Virginia had responded to similar lawsuits with temporary restraining orders (TROs) against the travel ban as it applied to their jurisdictions (the Massachusetts TRO was later lifted), Robart went further, halting the ban nationwide.

Robart’s decision, sweeping though it was, wasn’t unprecedented. In fact, it paralleled the order issued by Texas federal District Judge Andrew Hanen in 2015 that invalidated, nationwide, President Obama’s DAPA and DACA programs, which sought to defer the deportation of undocumented parents of U.S. citizens, lawful permanent residents and aliens who had arrived here as children. Both Robart and Hanen were appointed to the federal bench by President George W. Bush, Robart in 2004 and Hanen in 2002.

Trump responded to Robart’s order explosively, deriding him on Twitter as a “so-called judge,” blasting the order as “ridiculous,” and bombastically predicting it would easily be overturned. He dispatched the Justice Department—now under new leadership after he fired acting Attorney General Sally Yates, who refused to defend the ban—to appeal Robart’s order to the 9th Circuit.

Step three in Trump’s thumping came in the oral argument on Feb. 7 before the three-judge circuit panel, which had been chosen by lot and comprised two Democratic appointees and one Republican. The proceedings were live streamed internationally by CNN. They turned out to be disastrous for the administration.

The government’s lawyer, career Department of Justice attorney August Flentje, maintained that the president was accorded broad discretion under federal immigration statutes in matters of national security, and that the EO was a proper exercise of that prerogative. If Flentje had stopped there, he might have salvaged at least a partial victory. The ban was plainly unconstitutional as applied to lawful permanent residents who were simply trying to get back into the country after traveling abroad, but it might pass muster regarding people trying to enter the U.S. for the first time.

Although Flentje appeared to offer such a compromise as a fallback position toward the end of the argument, he never backed down from the administration’s hard first line of defense—that the president possessed “unreviewable authority to suspend the admission of any class of aliens” at any time and in his sole judgment. The states had no standing to object to the president’s order, Flentje elaborated, and the courts had no business intervening on their behalf or on behalf of the states’ residents.

Step four in Trump’s comeuppance arrived when the panel handed down a unanimous 29-page decision Feb. 9. Not only did the panel decline to lift Judge Robart’s TRO, but it also found that the states—whose position by the time of oral argument had been bolstered by the filing of amicus curiae (friends of the court) briefs by 17 other states and the District of Columbia, along with numerous technology companies—had standing to challenge the ban.

Most importantly, the panel held, in words that literally harken back to the earliest days of our constitutional jurisprudence, that the EO was indeed subject to judicial review:

[T]he government has taken the position that the president’s decisions about immigration policy, particularly when motivated by national security concerns, are unreviewable, even if those actions potentially contravene constitutional rights and protections. … There is no precedent to support this claimed unreviewability, which runs contrary to the fundamental structure of our constitutional democracy.

Exercising that power, the panel found, pending further and more complete briefing on the merits, that the travel ban likely violated due process principles, and that it also raised serious questions under the establishment clause, which precludes official acts and executive orders that result in religious discrimination.

America has been wrangling over the concept of judicial review since Alexander Hamilton advocated in favor of the doctrine in Federalist Paper No. 78 back in 1788, and the Supreme Court first affirmed the doctrine in Marbury v. Madison in 1803. In its most basic sense, the principle endows the judicial branch with the authority to declare acts of either the executive or legislative branches of government unconstitutional. It assigns to the courts the role of interpreting the meaning of the Constitution, and gives them, under the Constitution’s Supremacy Clause, the final word in the resolution of constitutional disputes.

Through the decades, the Supreme Court has exercised the power of judicial review often and decisively. According to the Library of Congress, the high court in its history has struck down over 180 acts of Congress and nearly 1,100 state statutes and ordinances.

Sometimes the power has been exercised wisely and in the service of human rights, as in the Brown v. Board of Education decision of 1954, which ended the Jim Crow era of “separate but equal” in public education. Other times, it has stood, sometimes horrifically, as an obstacle to progress, as in the court’s infamous Dred Scott case of 1857, which upheld the institution of chattel slavery and overturned the Missouri Compromise of 1820.

But the power itself is, as the 9th Circuit panel wrote, part of the fundamental structure of our democracy. It is, in the final analysis, our most vital check on runaway executive authority.

In the immediate aftermath of the panel’s travel ban ruling, the Trump administration has sent mixed signals as to whether it will pursue an appeal to the Supreme Court, continue to litigate in the 9th Circuit or the district court, or redraft the EO in more narrow terms.

Whatever option it elects, the administration remains dangerously defiant in the face of a skeptical judiciary. Trump policy adviser Stephen Miller, appearing on CBS’ “Face the Nation” on Sunday, went so far as to say the “whole world will soon see” that the president’s powers “will not be questioned.”

Sometimes, it seems, some people never learn from a good ass-kicking.

Your support is crucial…

With an uncertain future and a new administration casting doubt on press freedoms, the danger is clear: The truth is at risk.

Now is the time to give. Your tax-deductible support allows us to dig deeper, delivering fearless investigative reporting and analysis that exposes what’s really happening — without compromise.

During this holiday season, stand with our courageous journalists. Donate today to protect a free press, uphold democracy and ensure the stories that matter are told.

SUPPORT TRUTHDIG