WASHINGTON - A federal judge ruled on Thursday that some prisoners held by the United States military in Afghanistan have a right to challenge their imprisonment, dealing a blow to government efforts to detain terrorism suspects for extended periods without court oversight.
In a 53-page ruling that rejected a claim of unfettered executive power advanced by both the Bush and Obama administrations, United States District Judge John D. Bates said that three detainees at the United States' Bagram Air Base had the same legal rights that the Supreme Court last year granted to prisoners held at the American naval base in Guantánamo Bay, Cuba.
The three detainees - two Yemenis and a Tunisian - say that they were captured outside Afghanistan and taken to Bagram, and that they have been imprisoned for more than six years without trials. Arguing that they were not enemy combatants, the detainees want a civilian judge to review the evidence against them and order their release, under the constitutional right of habeas corpus.
The importance of Bagram as a holding site for terrorism suspects captured outside Afghanistan and Iraq has increased under the Obama administration, which prohibited the Central Intelligence Agency from using its secret prisons for long-term detention and ordered the military prison at Guantánamo closed within a year. The administration had sought to preserve Bagram as a haven where it could detain terrorism suspects beyond the reach of American courts, telling Judge Bates in February that it agreed with the Bush administration's view that courts had no jurisdiction over detainees there.
Judge Bates, who was appointed by President George W. Bush in 2001, was not persuaded. He said transferring captured terrorism suspects to the prison inside Afghanistan and claiming they were beyond the jurisdiction of American courts "resurrects the same specter of limitless executive power the Supreme Court sought to guard against" in its 2008 ruling that Guantánamo prisoners have a right to habeas corpus.
Dean Boyd, a Justice Department spokesman, said that the administration was reviewing the decision and that it had made no decision about whether to appeal.
Judge Bates emphasized that his ruling was "quite narrow." He said that it did not apply to prisoners captured on the battlefield in Afghanistan, and that a determination of whether prisoners might challenge their detention in court would depend on a case-by-case analysis of factors like their citizenship and location of capture.
"It is one thing to detain those captured on the surrounding battlefield at a place like Bagram, which respondents correctly maintain is in a theater of war," the judge wrote. "It is quite another thing to apprehend people in foreign countries - far from any Afghan battlefield - and then bring them to a theater of war, where the Constitution arguably may not reach."
Moreover, the judge has put off ruling that a fourth prisoner - also captured outside Afghanistan, but holding Afghan citizenship - had a right to challenge his detention. He said any order to release the detainee could lead to frictions with the Afghan government, and asked for additional briefings on that case.
The United States is holding about 600 people at Bagram without charges and in spartan conditions. United States officials have never provided a full accounting of the prison population, but an American government official, speaking on condition of anonymity because it is against policy to discuss details of the Bagram prison, said that fewer than a dozen detainees fell into the category affected by the ruling - non-Afghans captured beyond Afghan borders.
Judge Bates has been involved in several high-profile executive power cases. In 2002, he sided with the Bush administration in a lawsuit over whether Vice President Dick Cheney's energy task force records were required to be disclosed. But in 2008, he sided with Congress in an executive-privilege dispute over whether top aides to Mr. Bush were immune from subpoenas related to the firing of federal prosecutors.
David Rivkin, an associate White House counsel in the administration of the first President Bush, predicted that Judge Bates's ruling would be overturned on appeal. He warned that the ruling "gravely undermined" the country's "ability to detain enemy combatants for the duration of hostilities worldwide."
But Tina Foster, the executive director of the International Justice Network, which is representing the four Bagram detainees, praised Judge Bates's decision as "a very good day for the Constitution and the rule of law."
Ms. Foster said that the Bagram ruling meant that changes to the Bush detention policies would go beyond merely closing Guantánamo and extend "to any place where the United States seeks to hold individuals in a legal black hole."
The power of federal judges to review decisions by the executive branch to imprison a terrorism suspect was among the most contentious legal issues that arose after the 2001 terrorist attacks. The Bush administration began a policy of holding prisoners indefinitely and without trials, arguing that federal judges had no authority to second-guess its decisions about whom to name an "enemy combatant."
But human-rights lawyers challenged those policies, winning Supreme Court decisions in 2004, 2006 and 2008 that gradually expanded the reach of the American legal system over detainees.
After taking office, Mr. Obama ordered a review of the evidence against each of the roughly 240 prisoners at Guantánamo as a first step toward closing the prison within a year.
He did not extend the steps he was taking to resolve the fate of the Guantánamo prisoners to those held at Bagram, although a comprehensive review of detainee policies is due to be completed in July. Ms. Foster said that the Bagram case may force the administration to speed up its decisions.
Eric Schmitt contributed reporting.