"I never talked to them about this issue," Hamdan told the judge through an Arabic interpreter. "I never pledged allegiance."
Judge Keith Allred, a Navy captain, is evaluating whether the May 2003 interrogation is tainted by coercion and therefore inadmissible as evidence at the first American war crimes trial since World War II. He said he would issue a ruling Thursday morning.
If the judge allows the jury to hear testimony of Naval Criminal Investigative Service agent Robert McFadden, it would contradict the defense lawyers' claim that Hamdan was merely a low-level bin Laden employee with no allegiance to al-Qaida.
McFadden said he would testify that Hamdan acknowledged taking "an oath of allegiance to bin Laden and the cause, the cause being expelling Jews and Christians from the Arabian peninsula."
Hamdan was captured at a roadblock in southern Afghanistan in November 2001 with two surface-to-air missiles in the car. He faces a maximum life sentence if convicted of conspiracy and supporting terrorism.
Allred, who has dismissed other statements Hamdan made under "coercive" conditions, said he would hold this interrogation to a high standard to penalize the government for delivering hundreds of pages of prison records after court-imposed deadlines.
"You're on the hot seat," Allred told prosecutors.
Hamdan has been held at this U.S. Navy base since May 2002. Military personnel from the detention center testified that he was transferred to another cell near 11 p.m. the night before McFadden's interrogation, but said the prison records did not clearly explain why.
Defense attorneys initially asked the judge to throw out all of the Guantanamo interrogations, arguing that he made the incriminating statements under the effects of abuse including sleep deprivation, solitary confinement and sexual humiliation.
McFadden testified that Hamdan was at ease during their interrogation, showed no signs of impairment and never complained of abuse. But Hamdan described being "very tired" during the session.
McFadden is the only one of roughly a dozen interrogators to testify at trial that the defendant swore the loyalty oath.
Prosecutor John Murphy urged the judge to accept McFadden's word over testimony from Hamdan.
"I think we're dealing with a very manipulative accused," said Murphy, a civilian attorney from the Justice Department.
Hamdan is one of 21 prisoners facing charges at Guantanamo. Military prosecutors say they are planning trials for 80 of the 265 foreign men held here on suspicion of terrorism or links to al-Qaida or the Taliban.