WASHINGTON -- A U.S. appeals court on Friday threw out the only remaining conviction against a Guantanamo Bay detainee who had served as Osama bin Laden's personal assistant, setting new restrictions on the use of military commissions to try terror suspects.

The U.S. Court of Appeals for the District of Columbia Circuit ruled 2-1 that the conspiracy case against Ali Hamza al-Bahlul was legally flawed because conspiracy is not a war crime.

The ruling could further hamstring the government's ability to prosecute terrorist suspects outside of civilian courts by using military tribunals created after the Sept. 11, 2001 terrorist attacks.

The Obama administration had argued that Congress acted within its authority in making conspiracy a crime that can be tried by military commission. But al-Bahlul's lawyers persuaded the judges that military commissions can only try offences recognized under the international law of war, which does not include conspiracy.

Writing for the court, Judge Judith Rogers said that trial by military commissions "does not extend to the trial of domestic crimes" such as conspiracy.

Judge Karen LeCraft Henderson issued a vigorous 85-page dissent, warning that the court's decision has "alarming" consequences for the future of bringing terrorists to justice.

"My colleagues' opinion means that, in future conflicts, the government cannot use military commissions to try enemy combatants for any law-of-war offence the international community has not element-by-element condoned," Henderson said, noting the rapid rise of Islamic state terrorism. "Their timing could not be worse."

Steven Vladeck, an American University law professor, said the ruling means that the military commissions at Guantanamo "can only be used to try international war crimes like the 9-11 attacks, and not any offence Congress authorizes them to prosecute." The decision should not affect military commission cases pending against those accused of plotting the 9-11 attack, who are charged with war crimes recognized under international law, he said.

But human rights advocates said the ruling should encourage the Obama administration to bring all future terrorism cases in federal civilian courts.

"This is just further proof that trying terrorism suspects in military commissions is a terrible idea," said Daphne Eviatar, senior counsel at the advocacy group Human Rights First. She noted that of the eight convictions in Guantanamo military commissions, four convictions have now been reversed.

Justice Department spokesman Marc Raimondi said the agency was reviewing the ruling and had no immediate comment.

After the Sept. 11 attacks, al-Bahlul was arrested by local authorities in Pakistan, turned over to the U.S. military and transferred to Guantanamo Bay. From 2004 to 2006, two military commissions were convened to try al-Bahlul for conspiracy. Both commissions were dissolved because of legal challenges in other cases.

The Pentagon said Bin Laden personally tasked al-Bahlul to create a videotape glorifying the al-Qaida bomb attack against the USS Cole Navy destroyer in a Yemeni port in 2000, an attack that killed 17 American sailors.

In 2008, charges were re-issued against al-Bahlul, and a military commission convicted him of conspiracy, soliciting others to commit war crimes and providing material support to a terrorist organization. He was sentenced to life imprisonment. Even after Friday's ruling, he will continue to be held at the Guantanamo Bay detention centre.

Last year, the appeals court had previously thrown out al-Bahlul's convictions for providing material support for terrorism and soliciting others to commit war crimes. It initially rejected al-Bahlul's challenge to his conspiracy conviction, but gave him another chance to attack it on constitutional grounds.