A US appeals court in Washington has ruled that the trial at Guantanamo Bay of a former driver for al-Qaeda leader Osama Bin Laden can go ahead.
Hamdan says he was just a driver
The decision overturns a lower court ruling that the trials for detainees held at Guantanamo were unlawful.
This latest ruling means in effect that the trials, known as military commissions, can now proceed.
Salim Ahmed Hamdan, from Yemen, is accused of conspiracy to commit war crimes, including terrorism.
A judge halted Mr Hamdan's trial last year, saying it could not proceed until a decision had been made on whether he was a prisoner of war under the Geneva Conventions.
Mr Hamdan contested his status as "enemy combatant", and his lawyers were seeking to force US authorities to try him in civilian court, arguing that the military tribunals were illegal under US law.
However, the appeals court judges ruled on Friday that the 1949 convention on the rights of prisoners of war did not apply to members of al-Qaeda.
This is a significant victory for US President George W Bush and his generals, and a blow for those who want to see Guantanamo Bay closed down, says the BBC's Adam Brookes in Washington.
Mr Hamdan can still take his case to a full hearing of the Appeals Court and from there to the Supreme Court.
Mr Hamdan worked for Bin Laden in Afghanistan from 1997 until the US attack in Afghanistan in 2001. He denies being a member of al-Qaeda.
Of the 540 inmates at Guantanamo, four have been charged. Of the rest, some will be released and many more will be held indefinitely.