A federal judge barred prosecutors on Wednesday from using a crucial witness in the first trial of a former Guantánamo detainee, adding to the fierce debate over whether the government can successfully prosecute terrorist detainees in civilian court.
The trial of Ahmed Khalfan Ghailani, who faces charges in the 1998 bombings of two United States Embassies in East Africa, has been seen as a test of President Obama’s goal of moving many other detainees, like Khalid Shaikh Mohammed, into federal court and, ultimately, closing Guantánamo.
In the months since Mr. Ghailani was brought to New York from Guantánamo Bay, Cuba, Judge Lewis A. Kaplan of United States District Court in Manhattan has rejected defense requests to dismiss the case because of violations of Mr. Ghailani’s right to a speedy trial and because of accusations he was tortured.
But just as the trial was to begin on Wednesday, Judge Kaplan ruled that he would not allow the witness to testify. He noted that the government had acknowledged that it had identified and located the witness through interrogation of Mr. Ghailani when he was earlier held in a secret overseas jail run by the Central Intelligence Agency. His lawyers have said he was tortured there.
Judge Kaplan said he was “acutely aware of the perilous nature of the world in which we live.”
“But the Constitution is the rock upon which our nation rests,” he went on. “We must follow it not only when it is convenient, but when fear and danger beckon in a different direction. To do less would diminish us and undermine the foundation upon which we stand.”
The judge delayed the trial’s opening until Tuesday, allowing the government to adjust its strategy or appeal the ruling. Attorney General Eric H. Holder Jr. said the government would be examining the judge’s opinion and deciding how to react to it.
Speaking in Washington, Mr. Holder seemed to play down the ruling’s significance.
“We are talking about one ruling, in one case by one judge,” Mr. Holder said.
“I think the true test is, ultimately, how are these cases resolved? What happens?” he continued, adding, “Can they be successfully resolved from the government’s perspective?”
Mr. Holder said history had shown that hundreds of terrorism and related cases had been resolved through pleas or convictions in civilian court. “I think it’s too early to say that at this point the Ghailani matter is not going to be successful,” he said.
Mr. Ghailani’s trial on charges he conspired in the embassy bombings in Nairobi, Kenya, and Dar es Salaam, Tanzania, was scheduled to begin on Wednesday. The attacks, orchestrated by Al Qaeda, killed 224 people.
After Mr. Ghailani was captured in 2004, he spent nearly five years in C.I.A. custody in so-called black sites and later at the military prison at Guantánamo.
Mr. Ghailani’s lawyers — Peter E. Quijano, Steve Zissou and Michael K. Bachrach — had argued that their client was tortured while in C.I.A. custody, and that any statements he made or evidence derived from those statements, including testimony from the witness whose existence he disclosed, was tainted and inadmissible.
After the hearing on Wednesday, Mr. Quijano praised the ruling, saying, “This case will be tried upon lawful evidence, not torture, not coercion.”
He said the Fifth Amendment had to apply to Mr. Ghailani as much as to any other defendant.
“It is the Constitution that won a great victory today,” Mr. Quijano said. “We applaud the court for its courage and support for the law.”
Prosecutors say the disputed witness, Hussein Abebe, sold Mr. Ghailani the TNT used to blow up the embassy in Dar es Salaam. They say that Mr. Abebe agreed voluntarily to testify against Mr. Ghailani, and that his decision to cooperate was linked only remotely to the interrogation.
Mr. Abebe had been characterized by prosecutors as a “giant witness for the government.” On Friday, a prosecutor, Michael Farbiarz, explained in court that without Mr. Abebe’s testimony about selling the TNT to Mr. Ghailani, “the government has no way of putting such evidence in front of the jury at all.”
But in a three-page order, Judge Kaplan said that “the government has failed to prove that Abebe’s testimony is sufficiently attenuated from Ghailani’s coerced statements to permit its receipt in evidence.”
The judge said he felt it was appropriate to emphasize that the trial was still proceeding, and that if Mr. Ghailani were convicted he faced the possibility of life imprisonment.
He added that Mr. Ghailani’s status of “enemy combatant” probably would permit his detention as something akin “to a prisoner of war until hostilities between the United States and Al Qaeda and the Taliban end, even if he were found not guilty.”
The judge said he would issue a fuller opinion later.
Karen J. Greenberg, executive director of the Center on Law and Security at New York University who observed the hearings on Mr. Abebe and is a strong advocate for trying detainees in civilian court, characterized the order as a “step forward for the rule of law, and therefore it cannot be a setback for the government.”
“We now know that there are lines when it comes to torture, and this is one,” she added.
Judge Kaplan has not ruled on whether Mr. Ghailani was mistreated while in detention, but, in his decision, said he assumed for the purpose of his analysis that Mr. Ghailani was coerced during interrogation. The ruling excluding Mr. Abebe’s testimony will probably make the government’s case more complicated to prove and the trial longer.
During the 2008 presidential campaign, Mr. Obama opposed the Guantánamo detention complex, calling it a recruiting symbol for terrorists. He initially ordered Guantánamo closed by January 2010, and later declared his intention to try terrorism suspects in federal court whenever feasible, igniting a debate over whether the civilian or the military system was better for such cases.
Critics of relying on the civilian system have said that defendants who have been held and interrogated as war criminals could be successfully prosecuted only by military tribunals or courts, with their less restrictive rules of evidence.
The judge did not elaborate on his observation that Mr. Ghailani could be detained in the military system if he were acquitted, but the comment spurred some debate among legal experts.
Ben Wizner, a senior lawyer with the American Civil Liberties Union, said the conventional wisdom about the Ghailani case was that the justice system works if he is convicted and fails if he is acquitted.
“But that’s not how we measure the effectiveness of a criminal justice system,” Mr. Wizner said. “The question is whether the government can present its case and whether the defendant can get a fair trial.”
Attorney General Holder, asked if the government was considering returning Mr. Ghailani to the military system and holding him indefinitely, replied, “We intend to proceed with this trial.”
Colin Moynihan contributed reporting.