By Paul Reynolds
World affairs correspondent, BBC News website
Treatment of detainees at Guantanamo Bay has been under scrutiny
The law passed by the US Congress defines the next stage of how the United States will treat and try suspects in the "war on terror" declared by President Bush after the 11 September attacks.
Until now the situation has been fairly chaotic. Mr Bush's attempt to set up military tribunals on his own authority was struck down by the Supreme Court, Guantanamo Bay suspects languished in a legal limbo, interrogation techniques amounting to torture in the view of many critics were used, prisoners were hidden away in secret locations.
The new law seeks to regulate that chaos. Supporters say that it does so in a manner broadly consistent with the values it seeks to uphold and will strengthen the war on terror. Critics argue that it institutionalises practices that are bad in themselves and will damage US worldwide interests.
The law departs from the norms of American criminal justice in the rules for the military commissions - it defines an "unlawful enemy combatant" in very broad terms, it gives immunity for previous interrogations and while it sets limits on interrogation methods it still leaves latitude for tough questioning.
It specifically lays out some banned methods. They include murder, rape and acts designed to cause "serious" suffering
According to Republican Senator John McCain the practice of "waterboarding", under which a prisoner is subjected to the sensation of drowning will be outlawed. So will prolonged sleep deprivation.
However, coercive questioning will not be banned. The president will be able to determine what methods are to be used and his decisions will be published.
Views for and against
For the Bush administration and the Republican controlled Senate and House of Representatives, the new measures are vital.
"In this new era of threats, where the stark and sober
reality is that America must confront international
terrorists committed to the destruction of our way of life,
this bill is absolutely necessary," said Republican
Senator Saxby Chambliss.
For opponents the law is a mistake. Democratic Senator Harry Reid.
said the measures "may have been tough, but they
certainly weren't smart... I'm convinced that future generations will view the passage
of this bill as a grave error."
Harsh interrogation techniques have attracted criticism
At issue here is how far a democratic society can equip itself with the methods it regards as necessary to achieve results without violating the very values it wants to protect and without prompting greater sympathy for its enemies.
Part of the story of President Bush's "war on terror" has been the way in which that balance has swung back and forth.
Mr Bush has certainly had to make concessions along the way. But he has also held firm to the concept of subjecting some detainees to coercive questioning and to the principle of military tribunals.
In this law he has achieved much, though not all, of what he wanted.
The upshot is a complicated and at times ambiguous series of rules that will have to be tested in practice.
The regulations will outlaw what they call "grave breaches" of Common Article 3 of the Geneva Convention including, as the president's national security adviser Stephen Hadley put it, "torture, cruel or inhuman treatment".
But the fact that the president will be left to decide whether others do not amount to "grave breaches" will be an area of dispute.
As for the military commissions, they will not have to follow the normal rules of evidence used in domestic criminal cases.
Nor will prisoners be allowed to invoke the law of habeas corpus to appeal against their detention. Habeas corpus is an ancient right acquired from English law under which a prisoner has to be brought before a court to have his/her detention justified. This provision, however, might be challenged in the US Supreme Court.
The debate, like the war itself, has not ended.