A federal appeals court on Friday set aside the military commission conviction of a Guantanamo Bay detainee who allegedly produced an al-Qaida recruiting video and served as Osama bin Laden's personal assistant and public relations secretary.

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 system of military commissions was created by the administration of President George W. Bush after the Sept. 11 terrorist attacks.

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

Writing for the court, Judge Judith Rogers said 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 offense the international community has not element-by-element condoned," Henderson said. "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 offense Congress authorizes them to prosecute." The decision should not affect military commission cases against those accused of plotting the 9/11 attack, who are charged with war crimes recognized under international law, he said.

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 Bahlul for conspiracy. Both commissions were dissolved because of legal challenges in other cases.

The Pentagon said Bin Laden personally tasked 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 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.

In 2013, the Obama administration told the federal appeals court in Washington that it was necessary to throw out the al-Qaida propagandist's convictions because of a decision overturning the conviction of Salim Ahmed Hamdan, bin Laden's former driver.

In a rehearing of the Bahlul case, an appeals court panel in July 2014 rejected Bahlul's challenge to his conspiracy conviction, but overturned his material support and solicitation convictions. However, the appeals court said Bahlul would still have a chance to bring additional constitutional challenges to the conspiracy conviction.