The US supreme court ruled today that the US president, George Bush, overstepped his authority in creating military war crimes trials for detainees at Guantánamo Bay.

In a rebuke to the Bush administration, Justice John Paul Stevens said the proposed trials were illegal under US law and Geneva conventions.

The ruling could hasten the closure of the US detention centre in south-east Cuba, which was set up to hold terror suspects picked up in Afghanistan, Iraq and elsewhere, beyond the reach of the US constitution and international law.

It raises major questions about the legal status of around 450 men still being held there, and how, when and where the administration will pursue the charges against them.

Two years ago, the court rejected Mr Bush's claim to have the authority to seize and detain terrorism suspects and indefinitely deny them access to courts or lawyers.

In this follow-up case, the justices focused solely on the issue of trials for some of the men.

The case focused on Salim Ahmed Hamdan, a Yemeni who worked as a bodyguard and driver for the al-Qaida leader, Osama bin Laden. Mr Hamdan, 36, has spent four years in the US prison in Cuba. He faces a single count of conspiring against US citizens from 1996 to November 2001.

Mr Hamdan has claimed he is an innocent father of two young daughters and that he worked as a driver for Bin Laden in Afghanistan only to eke out a living for his family.

The supreme court justices voted 5-3 against the government.

Justice Anthony M Kennedy, regarded as a moderate conservative, joined the court's liberal members in most of the ruling against the Bush administration.

"Trial by military commission raises separation-of-powers concerns of the highest order," Mr Kennedy wrote in his opinion.

"Concentration of power [in the executive branch] puts personal liberty in peril of arbitrary action by officials, an incursion the constitution's three-part system is designed to avoid."

Justice Clarence Thomas wrote a strongly worded dissent and took the unusual step of reading part of it from the bench - something he had never done before in his 15 years on the supreme court. He said the court's decision would "sorely hamper the president's ability to confront and defeat a new and deadly enemy".

Justices Antonin Scalia and Samuel Alito also filed dissents.

The chief justice, John Roberts, named to lead the court last September by Mr Bush, was sidelined in the case because, as an appeals court judge, he had backed the government over Mr Hamdan. Today's ruling overturned that decision.

The camp, where inmates endure open-ended interrogation and detention, has become an international symbol of the Bush administration's aggressive anti-terror policies. Three detainees committed suicide there this month, using sheets and clothing to hang themselves. The deaths brought new scrutiny and criticism of the prison, along with fresh calls for its closure.

The Bush administration hinted in recent weeks that it was prepared for the court to set back its plans for trying Guantánamo detainees.

Mr Bush said last week that he would like to close the camp, but was waiting for direction from the supreme court. "I'd like to end Guantánamo. I'd like it to be over with," he said after meeting European leaders in Vienna last Wednesday.

Today, Tony Snow, a spokesman for Mr Bush, said the White House would have no comment until lawyers had had a chance to review the decision.

Amnesty International responded by calling for the US to "immediately release prisoners or allow fair trials for all detainees".

Amnesty's UK director, Kate Allen, said: "This ruling should now lead to the US administration ending the scandal of holding Guantánamo prisoners in defiance of international human rights law."

She also called for authorities to disclose details about all other alleged anti-terror detention centres.

More than 750 inmates have passed through the prison at Guantánamo, which was erected in the months after the terrorist attacks on the US on September 11 2001.

The number of prisoners held at Guantánamo has, however, been falling, with no new detainees arriving since September 2004. Of the current 450 inmates, the Pentagon has already said it intends to transfer 120 to their home countries.