The Fourth Circuit’s decision Wednesday dismissing Yasser Esam Hamdi’s habeas petition is a clear and necessary vindication of the president’s war power. At the same time, the decision ensures an appropriate role for independent judges to ask the government to justify itself when a U.S. citizen is being held in detention and without criminal charge.

It is possible that some will still contend that the wrong balance was struck and civil liberty has been lost. Yet, the separation of powers vindicates not only liberty, but also security. For the judiciary to have intruded more searchingly would have undermined the nation’s safety. Liberty dies not only when military or executive officers overstep their authority, but also when a nation is incapable of defending itself from foreign attack.

The unanimous decision affirmed that the president’s authority is ample, but not without limit. To sustain an enemy detention, he can be asked to make a reasonable factual showing of the circumstances of capture as well as that he is operating under proper legal authority. Thus, the salient fact for Hamdi was that he was captured in Afghanistan, a war zone, and President Bush has both inherent authority and legislative delegation to use “all necessary and appropriate force” to address past and future acts of terrorism.

The appellate court was careful to confine its analysis to the case before it. Thus, the Fourth Circuit did not reach out to discuss the appropriate standard of review applicable to those captured within the United States. Of course, a trial court and a different judge have earlier ruled that alleged dirty-bomb planner Jose Padilla, even though captured in Chicago, was also properly classified as an enemy combatant.

In actuality, the location of capture should make no difference. It didn’t in the case of Nazi saboteurs, and it shouldn’t now. The basic point is that the Constitution gives the president the competence to conduct the war, and the judges must give deference to it. As the Supreme Court said in rejecting judicial second-guessing near the end of World War II, “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.” This has even greater truth when both the offensive and defensive steps necessitated by terrorist threat can, and tragically have, become manifest at home.

The Fourth Circuit also did not address the issue of access to counsel since it was not raised on appeal. By comparison, Judge Mukasey has awarded Jose Padilla a qualified right of closely monitored counsel, though it is subject to rules that still must be worked out. While a right to counsel in criminal proceedings is a familiar aspect of constitutional fairness, it is far from self-evident that acknowledged enemy combatants ought to be given Miranda rights on the battlefield or during military detention. There is no precedent for that and it undermines intelligence gathering against the enemy. Should charges be brought in court or military tribunal, counsel can be provided, not before.

The district court in Hamdi’s case would have waded intrusively into questions well beyond the capability of the judiciary. It simply cannot be true that a federal judge is to analyze the original notes of military interrogations, where they occurred, who was present, or statements made by the representatives of foreign governments who happened to be present. All these things and more were mistakenly demanded by the lower court. The trial judge conceded that Hamdi had a weapon and that he was in Afghanistan on the side of the Taliban. To ask further whether or how often he fired his weapon is, as the court said, “to demand a clarity from battle that often is not there.”

Rightly, the appellate judges did not invent or expand the judicial role on the basis of international treaty. The Geneva Convention has no explicit provision for enforcement by private lawsuit. If a nation signatory is in default, the remedy must be sought — as with many treaties — by diplomatic means. Moreover, Hamdi — arguably an unlawful combatant engaged in acts contrary to the laws of war — falls well outside the scope of the international pact designed to govern regular armies. Even were Hamdi’s status open to more doubt, the tribunals of review envisioned by the treaty are not necessarily judicial ones.

That said, the fact that the judiciary heard the case is a tribute to the fact that “in war as in peace, habeas corpus provide[s] one of the firmest bulwarks against unconstitutional detentions.” What this decision makes plain, however, is that it does not preclude constitutional ones. We are well reminded by the judges that “the military has been charged by Congress and the executive with winning a war, not prevailing in a possible court case.”