Critics of President George W. Bush have long claimed that he used the September 11 attacks to expand executive power beyond its proper constitutional bounds. The primary support often cited for this proposition is that the administration has been rebuked on these issues by the courts. Those claims, however, cannot withstand serious scrutiny. Although the president and his advisers have certainly acted assertively in many areas involving the war on terror, they have done so within the Constitution’s text and history, in accordance with past presidential practice and available judicial precedent. In fact, if there has been empire building since September 11, it has been by the U.S. courts, not by the president. This is especially true with respect to what is probably the most controversial”at least for lawyers”aspect of the Bush administration’s wartime policies: the detention, without criminal charge or trial in the civilian courts, of alleged Al Qaeda and Taliban operatives at Guantánamo Bay.

When Mohammed Atta and his compatriots boarded their scheduled flights on September 11, 2001, the rights of wartime detainees were governed by a handful of major precedents. These cases were generally marked by judicial restraint, especially with regard to foreign nationals held by the United States overseas. In crafting its original detainee policies over the fall and winter of 2001-02, and in defending them against subsequent legal challenges, the Bush administration has principally relied on two critical, if decades-old, U.S. Supreme Court decisions: 1942′s Ex Parte Quirin and 1950′s Johnson v. Eisentrager. Together, these cases, along with the laws and customs of war that the Supreme Court consulted in reaching its decisions, gave the president sufficient flexibility to detain captured enemies without a civilian trial (at least so long as hostilities continued), where appropriate to charge them either in the civilian courts or in military commissions, and otherwise to deny foreign nationals held outside of the territorial U.S. the opportunity to challenge their detention in the federal courts. In other words, President Bush did not expand executive power to deal with detainees because he had no need to do so. History and precedent supplied him with all the power he needed.

Quirin involved the 1942 trial of eight Nazi agents who had been dispatched by Germany to commit terrorist acts in the American homeland. After the Federal Bureau of Investigation captured the agents, President Franklin Delano Roosevelt decreed their trial by military commission”a form of justice used by the U.S. since the War for Independence. Roosevelt also made clear to Attorney General Francis Biddle that he would not “hand them over to any United States marshal armed with a writ of habeas corpus.” The defendants in Quirin claimed a right to trial in civilian courts, but the Supreme Court agreed with the president, upholding their trial and conviction by military commission. Six were electrocuted.

Sixty years later, President Bush quite properly relied upon the Quirin Court’s articulation of the distinction between the rights and privileges of “lawful combatants” (generally the regular sol-diers of sovereign states) and “unlawful combatants.” Under the Court’s definition, which was grounded in the international laws of war, unlawful combatants failed to meet four critical criteria: maintaining a regular command structure, wearing uniforms, carrying arms openly, and otherwise obeying the law of war by, among other things, not attacking civilians. The Bush administration, of course, concluded early on that both Al Qaeda and Afghanistan’s Taliban militia failed this all-important test and also determined, as a result, that they were not entitled to rights under the 1949 Geneva Conventions.

The administration’s critics have tried to distinguish Quirin’s saboteurs from terror detainees be-cause (unlike in World War II) Congress did not “declare war” after September 11, and Al Qaeda (unlike Germany) is not a state actor. Invoking the laws of war, however, does not require a formal declaration-”a practice that actually was waning even before the Constitution was adopted”and Congress specifically authorized the use of military force against those responsible for the September 11 attacks and their allies. Moreover, the Supreme Court has long recognized that a “war” can exist between the United States and non-state actors, such as unrecognized Indian bands. Indeed, much of the “warfare” since World War II has been between states and nonstate actors, in the form of guerrillas and “national liberation movements”-”like Al Qaeda, the very models of unlawful enemy combatants.

The Bush administration has also been criticized for resisting any judicial process for the Guantánamo Bay detainees, but here it has also followed executive branch and Supreme Court precedent. In World War II’s aftermath, the Truman administration argued against federal judicial review for alien combatants held overseas, and prevailed. As a result, the Bush administration relied on the Supreme Court’s 1950 ruling in Johnson v. Eisentrager in defending its own decision to hold Al Qaeda and Taliban captives outside the United States without judicial process.

In Eisentrager, the Court ruled that German prisoners captured in China and held by U.S. forces in occupied Germany”outside of American territory”were not entitled to seek habeas review of their detention in U.S. federal courts. Justice Robert Jackson, fresh from his own stint in Ger-many as the chief Nuremberg prosecutor, explained the very good and sufficient reasons for this rule as follows:

It would be difficult to devise more effective fettering of a field commander than to allow the very enemies he is ordered to reduce to submission to call him to account in his own civil courts and divert his efforts and attention from the military offensive abroad to the legal defensive at home. Nor is it unlikely that the result of such enemy litigiousness would be a conflict between judicial and military opinion highly comforting to enemies of the United States.

Moreover, we could expect no reciprocity for placing the litigation weapon in unrestrained en-emy hands. The right of judicial refuge from military action, which it is proposed to bestow on the enemy, can purchase no equivalent for benefit of our citizen soldiers.

This was the law in late 2001, when the Bush administration began to formulate its detainee pol-icy.

The individuals detained by the United States at Guantánamo and elsewhere had legal protection; claims that Guantánamo, in particular, was a “law-free zone” were always polemical. To begin with, the American forces serving there (and elsewhere) are subject to the Uniform Code of Military Justice (UCMJ), under which abuses of the detainees can and have been prosecuted. Second, although the detainees’ status as unlawful enemy combatants meant that they were not entitled to the rights of either prisoners of war or civilians under the Geneva Conventions, customary international norms entitled them to humane treatment, including a trial before criminal punishment could be imposed.

But detention in and of itself is not a criminal punishment, as even the badly divided Supreme Court ruled in its first major Guantánamo detainee case, 2004′s Hamdi v. Rumsfeld. Five justices agreed that the United States was engaged in a legally cognizable armed conflict even without a declaration of war, and that captured enemies could be held without criminal charge for the duration of hostilities.

The Court also ruled, of course, that detainees were entitled to some structured administrative process to challenge their classification as enemy combatants subject to detention. The administration moved promptly to create an elaborate system of “combatant status review tribunals” and “administrative review boards,” granting the detainees far more due process than they would have received under either the Geneva Conventions or any other previous wartime practice. This system was later revised and codified by Congress in the Detainee Treatment Act of 2005, which granted detainees an appeal route into the federal courts. Both of the two political branches”the president and Congress”seemed at this point to have retained their traditional ability to deal with detention-related matters as policy issues, largely free from judicial micromanagement.

What a difference a few short years make. In the Supreme Court’s subsequent terror cases, it was the justices”and not the president”who, unfortunately, overstepped historical boundaries. In 2006 the Court considered the case of Osama bin Laden’s driver, Salim Hamdan, who was captured in Afghanistan and detained at Guantánamo Bay, Hamdan was designated for trial by military commission under the president’s original order of November 13, 2001. He challenged that order’s legality and won, although on something of a technicality. The Supreme Court accepted that military commissions were a legitimate part of the American military justice system, but concluded that the president had failed to justify various departures from the UCMJ rules governing ordinary courts-martial. Congress immediately amended the uniform code to establish military commissions by statute in the 2006 Military Commissions Act. As it had in the Detainee Treatment Act, Congress also strictly limited the judiciary’s role in reviewing these cases.

But in 2008′s Boumediene v. Bush, the Court”doubtless emboldened by 40 years of growing primacy in domestic affairs, as well as the encouragement of many congressional leaders”swept aside these limitations, ruling that detainees at Guantánamo Bay, and potentially at any other site wholly controlled by the United States, were constitutionally entitled to challenge their detention by seeking a habeas writ in the federal courts. The ruling represents one of the Supreme Court’s most unbridled assertions of judicial power.

It was the Court’s perception of the unconventional nature of the current conflict, together with evident institutional ambition, that led it down this road. As Justice Anthony Kennedy noted, “The cases before us lack any precise historical parallel. They involve individuals detained by executive order for the duration of a conflict that . . . is already among the longest wars in American history.”

Yet the laws of war developed over a period of centuries when conflicts were often longer”sometimes measured in decades”than those experienced by the United States in its relatively brief history. There is also no question that the traditional rules are harsh (many were designed to be so as a means of protecting the civilian population), especially in a long conflict.

Moreover, Congress and the president had already acted to ameliorate these rules by statute. By opening the courthouse doors even wider, the Court in Boumediene created both uncertainty and opportunities for Al Qaeda. The Court left for the future the question of what constitutional rights beyond habeas corpus review captives are entitled to. As Justice Kennedy wrote:

Because our nation’s past military conflicts have been of limited duration, it has been possible to leave the outer boundaries of war powers undefined. If, as some fear, terrorism continues to pose dangerous threats to us for years to come, the Court might not have this luxury. The result is not inevitable, however. The political branches, consistent with their independent obligations to interpret and uphold the Constitution, can engage in a genuine debate about how best to preserve constitutional values while protecting the nation from terrorism.

Needless to say, the Constitution, and not the Supreme Court, defines the outer boundaries of war powers. And the president and Congress have, in fact, been engaged in exactly that debate”about how to protect the nation’s values and the invaluable lives of its citizens”for the past seven years. The Bush administration’s detention policies were both developed and litigated in ways that were solidly grounded not just in the first principles”the Constitution”but also in a well-established body of judicial precedent. The fact that the president’s policies did not fare well in the courts is largely the fault of the judiciary, which chose, over the course of a few short years, to effect a remarkable and unprecedented change in our constitutional allocation of war-related powers.

It is, of course, impossible to say whether the administration’s detention policies would have fared better in the courts had the president sought congressional action at once, as some have suggested, rather than relying on the Supreme Court’s own preexisting precedents. But the court’s decision to ignore history, disregard the text of the Constitution, and sweep aside clear congressional efforts to limit the judiciary’s role suggest that it would not have mattered. As a result, the next administration will now have to deal with a judiciary far more likely than past courts to second-guess the political branches’ wartime decisions”but one that still lacks the experience, expertise, or accountability of either Congress or the president in this all-important area.

David B. Rivkin, Jr., and Lee A. Casey are partners in the Washington, D.C., office of Baker & Hostetler. They served in the White House and Justice Department during the Reagan and first Bush administrations.