A federal appeals court ruled yesterday that hundreds of detainees in U.S. custody at Guantanamo Bay, Cuba, do not have the right to challenge their imprisonment in federal courts, a victory for the Bush administration that could lead to the Supreme Court again addressing the issue.

In its 2 to 1 decision, the U.S. Court of Appeals for the District of Columbia Circuit upheld one of the central components of the Military Commissions Act, the law enacted last year by a then-Republican-controlled Congress that stripped Guantanamo detainees of their right to such habeas corpus petitions. Lawyers have filed the petitions on behalf of virtually all of the nearly 400 detainees still at Guantanamo, challenging President Bush's right to hold them indefinitely without charges. Yesterday's ruling effectively dismisses the cases.

Attorneys for the detainees vowed to quickly petition the Supreme Court to hear the case.

Judge A. Raymond Randolph wrote in the majority opinion that to overrule the new law, which Bush signed in October, would "defy the will of Congress." He and Judge David B. Sentelle also found that historical interpretations of habeas corpus do not apply to foreign nationals not on U.S. soil, determining that the U.S. military prison at Guantanamo Bay is a leased property that falls under Cuban sovereignty.

"Federal courts have no jurisdiction in these cases," Randolph wrote in the combined cases of Al Odah v. USA and Boumediene v. Bush. "Our only recourse is to vacate the district courts' decisions and dismiss the cases for lack of jurisdiction."

In a lengthy dissent, Judge Judith W. Rogers raised two central questions of constitutional law that could form the basis of arguments before the Supreme Court, if it chooses to hear the case. She wrote that the writ of habeas corpus can apply to foreign nationals outside the United States and that Congress has not properly suspended habeas corpus, something it has done only four times, including during the Civil War.

Rogers wrote that Congress may suspend that right "when in cases of rebellion or invasion the public safety may require it" but that Congress has not invoked that power now, adding that its actions "exceed the powers of Congress."

Justice Department lawyers have argued for years that foreign detainees should not enjoy constitutional rights when they are detained in other countries amid accusations of terrorism against the United States and its allies.

"We are pleased with the decision of the U.S. Court of Appeals for the D.C. Circuit upholding the constitutionality of the Military Commissions Act (MCA) and dismissing the consolidated Guantanamo detainee cases for lack of jurisdiction," Erik Ablin, a department spokesman, said in a statement.

Shayana Kadidal, a lawyer with the Center for Constitutional Rights, which represents hundreds of Guantanamo detainees, said defense attorneys will petition the Supreme Court "as quickly as possible." He said the decision grants government officials broad latitude in its treatment of detainees and gives detainees no legal way to address it.

"This decision allows the president to basically do what he wants to prisoners without any legal limitation as long as he does it offshore," Kadidal said. He said that his clients at Guantanamo have experienced "disgust and exasperation at the American legal system" and that their "feelings of desperation" now will only grow.

Washington lawyer David Remes, who also represents Guantanamo detainees, said he is disappointed by the decision but not completely surprised. He expects the Supreme Court to hear the case.

In two decisions, the Supreme Court has upheld Guantanamo detainees' rights to contest their incarceration in federal courts. But the court also made it clear that Congress could weigh in on the issue, which it did by approving the Military Commissions Act. That law mandated special military trials for the detainees.

Douglas W. Kmiec, a professor of constitutional law at Pepperdine University, said it appears that Congress clearly intended to remove the court's jurisdiction. He said, however, that questions remain about the application of habeas rights and their evolution since the late 1700s.

"We're dealing with an area that has been subject to some difficult and subtle rulings from the beginning of the foundation of our country," Kmiec said. "The law has been a moving target."

Democrats, who now hold the majority in both houses, have vowed to quickly amend the Military Commissions Act with provisions that would restore habeas rights for detainees.

Patrick J. Leahy (D-Vt.), chairman of the Senate Judiciary Committee, and the committee's ranking Republican, Arlen Specter (Pa.), have introduced a bill that would restore habeas corpus rights. Specter urged congressional action because the Supreme Court could take months to hear the case.

Sen. Christopher J. Dodd (Conn.), a candidate for the Democratic presidential nomination, introduced a bill last week that would return habeas corpus rights to detainees while clarifying other parts of the law. Dodd said yesterday his legislation is now "even more critical."

It is unclear whether Bush would veto such legislation, which would challenge a central element of his anti-terrorism platform.