Three federal appellate judges yesterday expressed doubts about the government's assertion that hundreds of foreign nationals imprisoned indefinitely at a U.S. military base in Cuba have no right to challenge their detention in U.S. courts.

The remarks from all three judges on a panel of the U.S. Court of Appeals for the District of Columbia Circuit came during oral arguments in the high-stakes dispute over whether the Bush administration is properly detaining prisoners at the military prison at Guantanamo Bay and whether special tribunals it established are sufficient to determine the detainees' guilt or innocence.

The case stems from a June 2004 Supreme Court ruling that Guantanamo Bay detainees are entitled to a "competent tribunal" to decide whether they are indeed enemy combatants, as well as the chance to contest the charges against them.

The government established tribunals to review the status of each detainee and determined that all but 38 of 558 prisoners were enemy combatants.

Tom Wilner, an attorney for a group of Kuwaiti detainees, argued yesterday that his clients are "wholly innocent of any wrongdoing" and were seized erroneously after the Sept. 11, 2001, terrorist attacks.

"We've been saying, 'You've got the wrong guys,' " Wilner said. "They were captured by mistake, turned over by bounty hunters."

A Justice Department lawyer argued that detaining enemy combatants is crucial to the president's ability to wage war against terrorism. "We live in a dangerous world, and the president needs the authority to act . . . to protect the nation," Gregory Katsas said.

The judges expressed doubts that the detainees had the same rights to due process as U.S. citizens accused of crimes. But they sharply disputed Katsas's assertion that none of the prisoners, most of whom were seized in Afghanistan in the fall of 2001, has a right to challenge his detention in U.S courts.

Known as a claim of habeas corpus, the right has been part of U.S. law since 1789.

The panel included Judge A. Raymond Randolph, an appointee of President George H.W. Bush and a member of the court panel that rejected the detainees' plea for access to U.S. courts and that later was overruled by the Supreme Court.

Judge David B. Sentelle, an appointee of President Ronald Reagan, quizzed the government about a hypothetical shepherd who is taken to Guantanamo based on mere suspicion. "Suppose [the military] said, 'There's no real evidence, but we decide he looks like al Qaeda,' " Sentelle said. "You can't just say we have a right to arrest and detain people as enemy combatants because they look like al Qaeda."

The judges also questioned the government's argument that U.S. courts have no right to review military decisions on enemy combatants.

The third member of the panel was Judge Judith Rogers, an appointee of President Bill Clinton.

The issue came to the appellate court after conflicting rulings by two federal judges in the District of Columbia. Judge Joyce Hens Green, who has overseen most of the detainees' habeas corpus challenges since the Supreme Court decision, ruled that the military procedure was stacked against detainees because it denied them access to lawyers and relied on dubious evidence. But Judge Richard J. Leon ruled in the case of Bosnian detainees that the courts should defer to the president's broad war powers.