Hamdi v. Rumsfeld
Hamdi v. Rumsfeld is a 2004 decision of the Supreme Court of the United States, in which the Court ruled that an American citizen, even if captured outside the country, still had the right to contest detention as an enemy combatant. Hamdi, an American citizen had been captured in the Afghanistan War (2001-). 
The majority agreed that Hamdi had a right to a hearing within the judicial system. A plurality had agreed that the detention was legitimate, accepting the argument of the U.S. Court of Appeals for the Fourth Circuit, which, in reversing Hamdi's original habeas corpus petition, had argued that the Authorization for the Use of Military Force reference to “necessary and appropriate force” authorized Hamdi’s detention. In that reversal, they restricted his rights to a "limited judicial inquiry into his detention’s legality under the war powers of the political branches, and not to a searching review of the factual determinations underlying his seizure."
It was emphasized that this applied specifically to a battlefield combat situation with U.S. forces. The plurality did not hold that the Authorization for the Use of Military Force did not permit indefinite extrajudicial detention by military forces anywhere in the world, outside combat. 
Several other laws and cases bear on the complex situation of a conflict involving the allegiance of the defendant, citizenship, and the place where captured. The Posse Comitatus Act forbids the use of the Army for civilian law enforcement, but the argument here was that the capture was purely a part of militry operations outside the United States, where civilian law does not apply. Ex parte Quirin established military jurisdiction over individuals captured on the soil of the United States, but who were operating for Nazi Germany during a declared war, even if some were U.S. citizens.
The term enemy combatant is a variant on the criteria for being eligible for prisoner of war (POW) status under the Third Geneva Convention. The more common language is "unlawful combatant", a lawful combatant meeting the criteria, adjudicated by a "competent tribunal" if necessary, for POW eligibility.
To some extent, the Detainee Treatment Act] and the Military Commissions Act of 2006 were a Congressional objection to this decision, although there were other issues both of Congressional authority and simply trying to clarify. 
- Hamdi et al. v. Rumsfeld, Secretary of Defense, et al.', 542 U.S. Sandra Day O'Connor (Supreme Court of the United States June 28, 2004), 507
- 542 U.S. at 512-13, 518-21
- Jennifer Elsea (October 29, 2001), Trying Terrorists as War Criminals, Congressional Research Service, CRS Order Code RS21056
- "The Need to Roll Back Presidential Power Grabs", New York Review of Books 56 (8), May 14, 2009