A U.S. military judge allowed prosecutors to use a disputed interrogation as evidence at the first Guantanamo war crimes trial, ruling Thursday the defendant was not coerced into saying he swore allegiance to Usama bin Laden.

In a heavily redacted ruling, Judge Keith Allred, a Navy captain, rejected defense claims that Salim Hamdan made the May 2003 statement under the influence of sleep deprivation or other coercive programs at the detention center on this U.S. Navy base.

The ruling cleared the way for Robert McFadden, an agent with the Naval Criminal Investigative Service, to describe the interrogation to jurors as the final prosecution witness.

Hamdan, a Yemeni, faces up to life in prison if convicted of conspiracy and aiding terrorism.

McFadden, one of nearly a dozen interrogators to testify at the trial, said Hamdan swore an Islamic oath, or "bayat," to bin Laden.

Although Hamdan supported the killing of Jews and Christians on the Arabian peninsula, he told bin Laden he would withdraw from the oath if "the jihad became Muslim on Muslim or political violence," McFadden said.

"Mr. Hamdan said he was convinced by the need for seeking jihad," he said.

In the nine-hour interrogation, McFadden said Hamdan also provided extensive details about bin Laden's security convoys in Afghanistan.

The reliability of the testimony was fiercely contested by defense lawyers, who say Hamdan was a low-level bin Laden employee who never joined his terrorist network. Hamdan took the witness stand Wednesday and denied telling McFadden that he pledged allegiance to bin Laden.

Defense lawyers have said Hamdan made the statements to McFadden under the effects of abuse including sleep deprivation, solitary confinement and sexual humiliation.

Allred said confinement at Guantanamo is "undoubtedly an unpleasant, highly regimented experience, with instant rewards or loss of privileges for infractions." But the ruling, more than half of which was blacked out, said the discipline imposed on Hamdan did not have any bearing on the interrogation.

Earlier in the trial, Allred dismissed other Hamdan statements that he determined were made under "coercive" conditions in Afghanistan. He previously threatened to dismiss the Guantanamo interrogation as a penalty against prosecutors for failing to turn over hundreds of pages of documents to the defense until the start of the trial.

McFadden, who provided Hamdan tea, raisins and dates during the interrogation, said Hamdan never complained of abuse to him and appeared to enjoy their conversation.