A federal appeals court announced Monday that it has overturned the Pentagon's classification of a Guantanamo Bay detainee as an enemy combatant.

In the first Guantanamo Bay case to be reviewed, the U.S. Court of Appeals for the District of Columbia Circuit ruled in favor of Huzaifa Parhat, a Chinese Muslim known as a Uighur, undermining the basis for his more than six years in detention.

The appeals court directed the U.S. military to release Parhat, to transfer him or to hold a new proceeding promptly in light of the appeals court's ruling.

The court also specified that Parhat could petition a federal judge seeking his immediate release in light of the Supreme Court's June 12 decision giving that right to all the detainees held at Guantanamo Bay.

Parhat never fought against the United States and the government concedes there's no evidence he ever intended to. He has been held for six years because he is linked to a Chinese separatist group that the military says has some ties to the Al Qaeda terrorist network.

Government attorneys say he can be held under the law authorizing military force against anyone who "planned, authorized, committed, or aided the terrorist attacks" of 2001.

The appeals court issued only a one-paragraph notice of its decision, saying that the ruling was made on Friday and that it contains classified information. A version of the ruling that will be available for public release is being prepared, the appeals court said.

Parhat is one of several Uighurs being held at Guantanamo Bay as suspected terrorists. Their case has become a diplomatic and legal headache for the U.S., which has tried to find a country willing to accept the Uighurs even as it defended its decision to hold them as enemy combatants.

The case hinges on Parhat's connection to the East Turkestan Islamic Movement, a militant group that demands separation from China. The United States named it a terrorist group in 2002, a move that some international affairs analysts say was made to appease China and ensure it would not oppose the invasion of Iraq.

The military says Parhat trained in an ETIM camp to prepare to fight against China. The Chinese government blames the separatist group for hundreds of attacks, while human rights groups say Beijing represses religious freedom and uses anti-terrorism laws to crack down on legitimate protests.

The three-member appeals court panel that issued the ruling consisted of Chief Judge David Sentelle and judges Merrick Garland and Thomas Griffith.

Sentelle is an appointee of President Reagan, Garland was appointed by President Clinton and Griffith was appointed by President George W. Bush.