After his capture in the 1998 bombing of a U.S. embassy in Tanzania, Ahmed Ghailani recalled welcoming news reports of the al-Qaida-sponsored terror attack — until it dawned on him his countrymen were killed.

"The target was Americans, not Tanzanians," Ghailani explained, according to a summary of a lengthy confession.

A jury would hear none of it when Ghailani went on trial more than a decade later.

With the confession barred from evidence, the trial last year resulted in Ghailani's conviction on just one count and an acquittal on 284 others in dual attacks in Tanzania and Kenya. But that's unlikely to stop a judge from giving him the same punishment at sentencing Tuesday as if he'd been convicted of everything: life in prison.

The potential for a paradoxical outcome in the closely watched test case points to the difficulties of applying civilian laws and rules of evidence in civil prosecutions of suspects picked up in other countries in the war on terror.

It also may dash hopes that the Ghailani case would clear the way for the trials of other Guantanamo detainees captured around the globe in the war on al-Qaida, including Khalid Sheikh Mohammed, the self-professed mastermind of the Sept. 11 terror attacks.

The confessions and the testimony of the government's main witness, a man who would say he sold explosives that were used in the bombs to Ghailani, were kept out of the trial because they were gathered by investigators whose priority was to stop further terrorism attacks rather than gather evidence for a criminal trial.

While a military tribunal might not allow evidence that was excluded from Ghailani's civilian trial either, its exclusion at a high-profile trial could make it harder for the government to argue that most detainees belong in a civilian court at a time when the issue has become politically charged.

President Barack Obama continues to say he wants to prosecute terrorists in both military commissions and criminal courts, but Congress has made that difficult. Lawmakers have prohibited the Pentagon from transferring detainees to the U.S., even to stand trial.

On the eve of trial, U.S. District Judge Lewis A. Kaplan excluded the testimony of the explosives salesman because he was discovered when Ghailani underwent harsh interrogation at an overseas CIA-run camp after his 2004 arrest in Pakistan. Prosecutors decided not to use the confessions because Ghailani wasn't advised of his rights before he spoke to agents and did not have access to a lawyer.

The rulings opened the door for a mixed verdict. During deliberations, the jury had indicated it was divided, and Kaplan theorized the guilty verdict on only one count reflected a compromise with a juror who was holding out against conviction.

"Thus, if there was any injustice in the jury's verdict, the victims were the United States and those killed, injured and otherwise devastated by these barbaric acts of terror, not Ghailani," the judge wrote as he rejected a request by defense lawyers to toss out the lone charge that resulted in Ghailani's conviction.

The judge called the evidence persuasive, citing proof that Ghailani bought one of the bomb-laden trucks, purchased 15 gas cylinders used in the bomb, stored and concealed detonators and sheltered an al-Qaida fugitive prior to the attacks.

In court papers, prosecutors agreed. They also cited evidence against Ghailani, including that he delivered hundreds of pounds of TNT to an al-Qaida cell two months before the bombings along with bags of fertilizer.

Some of the best evidence the jury never saw may have been FBI recounts of interviews of Ghailani, including discussions in January and February 2007, months after he was brought to the U.S. Naval Base in Guantanamo Bay, Cuba, from the CIA camp overseas.

In those, Ghailani's history is described back to his 1974 birth in Zanzibar, Tanzania, including that his best childhood friend went for military training in 1996 to Afghanistan and introduced him to friends who were involved in the militant Islamic movement.

The FBI said Ghailani told agents that Ghailani wanted to get military training because his childhood friend and others he had met "seemed like heroes, and he wanted to be like them."

The FBI said Ghailani also said he wanted to learn weapons, do jihad and "wanted to learn to fight so that he could kill Jews."

It was only after the embassy bombings, that Ghailani got to go through training in Afghanistan, according to the FBI interviews.

He later served as a bodyguard and cook for Osama bin Laden, though he did not have any private conversations with him and eventually got tired of the duties and asked to learn how to forge documents, the FBI said.

The FBI quoted him as saying he was being trained on making fraudulent documents when his trainer was making some of the fraudulent documents used by 19 men who hijacked planes on Sept. 11, 2001.

It also said he was in Karachi, Pakistan, at the time of the attacks and asked Khalid Sheik Mohammed who did it, only to be told he didn't know.

The FBI said Ghailani didn't believe Mohammed didn't know and "assumed it was a secret."

The questioning of the interviews was wide ranging at times, including when agents asked Ghailani if he knew any men who wore women's clothing when they traveled. He said he had worn a burqa at times when he traveled, the FBI said.