U.S. detentions of enemy combatants, some people say, are troublesome because they are potentially of indefinite duration. America held enemy prisoners during World War II and earlier wars, but at least there the wars were over in several years; the war on terror could go on indefinitely. Isn't that unfair to the detainees? Try them or let them go, people say. Note that this argument is independent of the conditions of confinement, or of the argument that some of the detainees may have been seized by mistake; people say this even about prisoners who are definitely al-Qaeda, Taliban, or Iraqi insurgents.
This argument, I think, is a mistake. Let me briefly explain why.
The purpose of detaining enemy combatants is prevention. An enemy soldier wants to kill our or our allies' soldiers (and often civilians). We normally stop that by killing him. But when he surrenders, we prefer not to kill him: Killing the enemy generally isn't our goal, but just the means to the end of protecting ourselves and our allies — and if we can serve that end by locking a captured enemy soldier up instead of killing him, we do that (and are required to do that by the laws of war).
The thing that makes this logic work, however, is our ability to keep the man locked up. When we release him, he can go right back to killing our soldiers. What's more, it seems quite likely that he will: If he tried to fight us once, why wouldn't he do that again? We release ordinary criminals after some time chiefly because we hope that the term in prison has deterred them from repeating their crimes. But someone who obviously isn't deterred by the risk of being killed (the high risk, when you're a small force fighting the U.S. military) isn't going to be deterred by the risk of repeat incarceration.
Thus, we have three options: (1) Kill them on the battlefield, and protect our and our allies' soldiers and civilians. (2) Lock them up until we feel confident that the war is pretty much over (which indeed could be decades), and protect our and our allies' soldiers and civilians. (3) Or in a fit of misguided mercy — misguided because it is mercy to the bad that ends up hurting the good — let them out and allow them to again kill our and our allies' soldiers and civilians. Option 3 strikes me as deeply unsound, and not required either by justice or by international law.
But why not try them, then, some people ask? Well, as to enemy soldiers who were fighting in uniform as part of a disciplined force, there's nothing to try them for: Fighting as a soldier who complies with the laws of war is not a crime. (If one weren't fighting in a war, one would surely be committing the crime of attempted murder, but being a soldier who fights according to the laws of war is actually a good defense against that charge, subject to various caveats.) They aren't being locked up to punish them for a crime; they are being locked up to prevent their engaging in lawful but deadly attacks on us.
Enemy terrorists, spies, saboteurs, and others who were fighting out of uniform, attacking civilians, or otherwise violating the law of wars could be tried for those violations, and imprisoned (perhaps for life) or executed. But we have no obligation to do so: Given that we can hold lawful enemy combatants until the end of the war (which indeed may take a long time), we can at least do the same for unlawful enemy combatants, which are in no better moral or legal position than the lawful combatants are.
Now there may sometimes be pragmatic reasons to release prisoners even before the end of the war. Prisoner exchanges are a classic example. Likewise, prisoners who are very sick or disabled might be released as a humanitarian measure — but the measure is humanitarian precisely because it seems unlikely to endanger our or our allies' soldiers or civilians. (There's little that's humanitarian in helping an enemy fighter in a way that jeopardizes our fighters or noncombatants.) Some prisoners may be turned over for trial by other countries for violation of those countries' laws, if we think such a turnover is politically valuable, and if we think the prisoners will indeed end up being locked up for long enough by those countries. One can imagine other reasons as well.
But as a matter of law and of morality, it's perfectly proper to keep an enemy soldier detained (again, I set aside the separate questions related to conditions of detention, and related to confirming that the person is indeed an enemy soldier) until he is no longer dangerous to us, even if that means he'll be locked up for the rest of his life. It's that; killing them on the battlefield; or letting them go so they can kill us.