By Paul Reynolds
World affairs correspondent, BBC News website
Treatment of detainees is frequently criticised by human rights groups
The United States Supreme Court has struck another blow in favour of prisoners held at Guantanamo Bay in Cuba.
In doing so, it has added a substantial new chapter to the history of the struggle between the executive and judicial branches of government.
It has also thrown into doubt the trials planned for about 80 detainees at Guantanamo Bay, as they will take their case to a US civilian court for review.
(Update: the US Attorney General Michael Mukasey has said that the trials will proceed, as the court did not rule on the military tribunal process. However, defence lawyers are likely to argue that the ruling undermines even the trials.
There are also some 200 other detainees who are not currently facing trial.)
The Bush administration's original hopes that the camp could become a zone free from the US courts lies in tatters. It is on land under the indefinite control of the US but not part of American territory.
The court was split between liberals and conservatives with the deciding vote coming from the centrist Justice Anthony Kennedy, who wrote the opinion and declared: "The laws and Constitution are designed to survive, and remain in force, in extraordinary times."
Justice Kennedy acknowledged that references to the history of habeas corpus might not sound relevant to those fighting terrorism but he went on: "Security subsists, too, in fidelity
to freedom's first principles. Chief among these are freedom from arbitrary and unlawful restraint and the personal
liberty that is secured by adherence to the separation
of powers. It is from these principles that the judicial
authority to consider petitions for habeas corpus relief
It was the third time that the court had struck down the administration's plans for Guantanamo. It ruled first that US law did extend there, then it said that the president lacked authority to set up military trials or commissions.
Each time, the administration hit back, getting Congress to authorise the commissions and setting up a system of hearings known as Combatant Status Review Tribunals, which it argued was an effective substitute for a hearing in a US civilian court.
But this argument did not convince a majority of the nine justices.
The defendants had argued that, despite the fact that Guantanamo Bay is in Cuba, the US exercises total control and the principles of US law should apply there. The court accepted this.
Some 270 men are still being held at the camp
The key law to be applied is the right of habeas corpus. This is an ancient right under English law, going back to the 14th Century at least - the words are Latin for "You have the body". Under it, a court can order someone holding a prisoner to bring the prisoner to a court to justify their detention.
It has for long been seen as a bulwark against the arbitrary arrest and imprisonment of the citizen.
It was carried over into the US constitution upon American independence.
The minority of justices had harsh words to say about the ruling.
Justice Antonin Scalia wrote of the "disastrous consequences
of what the Court has done today." He said: "Today, for the first time in our Nation's history, the
Court confers a constitutional right to habeas corpus on
alien enemies detained abroad by our military forces in
the course of an ongoing war."
"America is at war with radical Islamists," he said.
The court's decision "will make the war harder on us. It will almost certainly cause more Americans to be killed," he stated.
The judgment is now being urgently studied for its likely impact on the future of the camp.