The U.S. Supreme Court has found against the government in the cases of Yaser Esam Hamdi, an American citizen being held at Gitmo as an enemy combatant, and several foreign nationals also being held at Gitmo. All were captured abroad, fighting in the cause of the Taliban.
Specifically, the Court has ruled that the plaintiffs in both cases are entitled to access to American courts -- Hamdi because he is a citizen, the others because they are being held at Gitmo, which is effectively U.S. territory. These narrow decisions aren't unmitigated losses for the forces of anti-terrorism. (You can read them here and here.)
I take away this lesson: Don't ship enemy combatants to Gitmo, hand them over to the Afghanis or Iraqis.