In 2006, Hamdan's lawyers successfully challenged the system of military commissions set up by President George W. Bush. That resulted in congressional enactment of the Military Commissions Act under which Hamdan was eventually tried.
A six-member military jury in 2008 cleared Hamdan of conspiracy while finding him guilty of material support for terrorism.
The Center for Constitutional Rights, a private group which has been deeply involved in detainee issues, praised Tuesday's decision but said it does not go far enough. The center says detainees at Guantanamo Bay are civilians under the laws of war and must be charged under domestic laws or released, rather than being tried under a system of military commissions.
Raha Wala, a lawyer for Human Rights First, said the case has repercussions for "every other flawed military commissions case like it. It's a basic rule of law principle that a defendant can't be prosecuted for acts that were not criminal at the time they were committed."
American Civil Liberties Union attorney Zachary Katznelson said the decision "strikes the biggest blow yet against the legitimacy of the Guantanamo military commissions, which have for years now been trying people for a supposed war crime that in fact is not a war crime at all."
Hamdan met bin Laden in Afghanistan in 1996 and began working on his farm before winning a promotion as his driver.
Defense lawyers say he only kept the job for the $200-a-month salary. But prosecutors alleged he was a personal driver and bodyguard of the al-Qaeda leader. They say he transported weapons for the Taliban and helped bin Laden escape U.S. retribution following the Sept. 11, 2001, attacks.
Hamdan was captured at a roadblock in Afghanistan in November 2001.
Associated Press writer Ben Fox contributed to this report from the Guantanamo Bay Naval facility.
Copyright 2012 Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.