In the first civilian judicial review of the government's evidence for holding any of the Guantanamo Bay detainees, a federal appeals court has ordered that a detainee be released or given a new military hearing.

The ruling, made public Monday in a notice from the District of Columbia U.S. Circuit Court of Appeals, overturned a Pentagon tribunal's decision in the case of one of 17 Guantanamo detainees who are ethnic Uighurs, a Muslim minority from western China.

The imprisonment of the 17 Uighurs (pronounced WEE-goors) has drawn wide attention because of their claim that although they were in Afghanistan when the United States invaded in 2001, they were never enemies of this country and were mistakenly swept into Guantanamo.

The court's decision was a new setback for the Bush administration, which has suffered a string of judicial defeats on Guantanamo policy, most recently in a Supreme Court ruling on June 12 that dealt with a separate issue of detainee rights. The Uighur case was argued long before that ruling by the justices.

The one-paragraph notice from the appeals court said a three-judge panel had found in favor of Huzaifa Parhat, a former fruit peddler who made his way from western China to a Uighur camp in Afghanistan.

"The court directed the government to release or to transfer Parhat, or to expeditiously hold a new tribunal," the notice said. It said the court had found "invalid" the military's decision that he was an enemy combatant.

The ruling, given to both sides on Friday, has otherwise been sealed for national security reasons but is expected to be released soon, with deletions.

The panel was made up of Judges David B. Sentelle, Merrick B. Garland and Thomas B. Griffith. Their decision, in the first judicial test of the government's justifications for holding any of the 270 men still detained at Guantanamo, could have broad application, lawyers said.

"This raises enormous questions about just who they are holding at Guantanamo," said P. Sabin Willett, Parhat's lead lawyer.

Its practical consequences for Parhat, however, were not clear.

The administration has said it will not return Uighur detainees to China because of concerns about their treatment at the hands of the Chinese government, which views them as terrorists. A State Department official said Monday that the department had not found a country to accept any of the Guantanamo Uighurs since Albania accepted five of them in 2006.

As a result, said one of Parhat's lawyers, Susan Baker Manning, court victory may not mean freedom for him.

The Justice Department said its lawyers were reviewing the decision.

By law, the appeals court has the power to review Pentagon hearings known as combatant status review tribunals, one of which found Parhat to be an enemy combatant. At those hearings, detainees are not permitted lawyers, cannot see all the evidence against them and face hurdles in trying to present their own evidence.

Although the adequacy of those hearings was an issue in the Supreme Court's June 12 ruling, that decision centered on what it found to be the detainees' constitutional right to challenge their detention in federal court through separate habeas corpus proceedings. The decision in Parhat's case came under the much more limited procedures that Congress provided for contesting the findings of the military hearings.

When the case went to the appeals court, the two sides took sharply different views of the small group of Uighurs who were in Afghanistan in 2001.

Justice Department lawyers asserted that the Uighurs had been at a training camp that, the government said, was associated with al-Qaida and the Taliban. Parhat's lawyers, on the other hand, noted that at his Guantanamo hearing, he explained that he had left China to fight for Uighur independence.

According to a transcript, he said that "we never been against the United States."