With a wide war on terrorism still being fought, an appellate court said Tuesday that Guantanamo Bay prison detainees had few legal rights, so long as the government could show they fought for or actively supported the Taliban or Al Qaeda.

A three-judge panel of the District of Columbia Circuit Court of Appeals upheld the government’s broad power to hold indefinitely suspected former Taliban fighters and their supporters who were captured abroad and sent to the U.S. military prison in Cuba.

The decision was the first by the appeals court to interpret what legal rights and rules apply to the Guantanamo detainees who are seeking their freedom through the courts. Two years ago, the Supreme Court ruled that these long-term prisoners had the right to appeal their detention before a judge, but the justices did not spell out the law that would apply in such hearings.

The appellate judges rejected the claim of Ghaleb Nassar Bihani, a Yemeni native who served as a cook for a Taliban brigade in the fall of 2001, that he deserved to go free because the U.S. war against the Taliban ended when the Islamist forces surrendered in 2002.

Judge Janice Rogers Brown said nothing in the law required the release of military prisoners just because the fighting ended in one sector. The law permits “what common sense tells us must be true: release is only required when the fighting stops,” she wrote. Otherwise, “each successful campaign of a long war . . . would trigger an obligation to release Taliban fighters captured in earlier clashes” who could then return to battle.

The judges also rejected the notion that these military prisoners were entitled to the full protections of the criminal law. For example, Bihani asserted that when he admitted to U.S. military investigators in Afghanistan that he fought alongside the Taliban, his statement should be deemed as “hearsay” and not used against him in a federal court hearing in Washington.

But Judge Brown said the habeas corpus hearing was not the same as a criminal trial. Otherwise, the military investigators from Afghanistan would be required to appear in a court to be cross-examined by the defense lawyers, she said.

“In a detainee case, the judge acts as a neutral decision maker charged with seizing the actual truth of a simple, binary question: Is detention lawful?” she wrote. “This is why the one constant in the history of habeas has never been a certain set of procedures, but rather the independent power of a judge to assess the actions of the executive.”

In this case, U.S. District Judge Richard Leon had decided there was ample evidence to conclude that Bihani had fought with the Taliban. That was reason enough to uphold his detention, Brown concluded. Appellate judges Brett Kavanaugh and Stephen Williams joined her in the ruling on Bihani, though Williams said he thought Brown’s opinion had gone too far on the legal issues.

david.savage@latimes.com