A Pakistani national has pleaded guilty to five charges related to terrorism, murder, conspiracy and spying, reaching a plea deal with the US government that limits his prison sentence.
A lawyer made the plea on Wednesday on behalf of Majid Khan, accused of helping al-Qaeda plot attacks against the US and aiding other "terrorist" groups, at a court in the US base in Guantanamo Bay, Cuba.
The plea deal, the first reached by one of the military's "high-value" detainees at Guantanamo, means Khan, 32, could serve less than 19 years in prison as long as he provides "full and truthful co-operation" in US cases against other prisoners, according to James Pohl, the military judge.
Khan had faced up to life in prison if convicted on all charges. Documents released before Wednesday's hearing had said the pre-trial agreement capped his sentence at 25 years.
The judge said his sentencing would be delayed for four years, giving him time to provide testimony against other detainees, and that the Convening Authority, the Pentagon legal official who oversees the tribunals, would not approve a total sentence that exceeded 19 years.
Khan would get credit for time served until his sentencing but not for the nine years he has already been in custody.
Al Jazeera's Rosiland Jordan, reporting from Guantanamo Bay, said: "Khan made the guilty pleas in exchange for a plea deal, the terms of which are being hammered out in a court session here in Guantanamo.
"The thought is that, according to prosecutors, Khan allegedly has a lot of intelligence information that could be useful in other potential prosecutions."
But Pohl told Khan in the court that there was nothing in the agreement that specifically prevented the US from continuing to detain him after he completed his sentence, though there are no indications that would happen.
"I am making a leap of faith here sir,'' Khan told the judge in response. "That is all I can do."
Prosecutors said Khan plotted with the self-proclaimed mastermind of the September 11 attacks, Khalid Sheikh Mohammed, to blow up fuel tanks in the US, to assassinate Pervez Musharraf, the former Pakistani president, and to provide other assistance to al-Qaeda.
Khan, who moved to the US state of Maryland with his family in 1996, allegedly traveled in 2002 to Pakistan, where he was introduced to Mohammed as someone who could help al-Qaeda because of his fluent English and familiarity with the US.
Khan later travelled with his wife to Thailand, where he allegedly delivered $50,000 to the southeast Asian group, Jemaah Islamiyah, which is considered a terrorist organisation by the US, to help fund the 2003 suicide bombing of the Marriott hotel in Jakarta. The attack killed 11 people and wounded at least 81 others.
Khan is the seventh Guantanamo prisoner to be convicted of war crimes and he is considered the most significant. He is the first prisoner who was held in clandestine CIA custody overseas, where prisoners endured harsh treatment that lawyers and human rights groups have labelled torture.
The US military holds 171 prisoners at Guantanamo, and officials have said about 35 could face war crimes charges.
Khan's attorneys wanted details of the plea deal kept confidential. Wells Dixon, one of his civilian lawyers, said Khan feared for the safety of family members in the US and abroad.
But Pohl rejected the request, saying the fact that he had agreed to co-operate was already in the public domain.
Khan, who claims he was one of other prisoners tortured by US authorities in the Guantanamo detention centre, made his first public appearance in the courtroom on Wednesday since his capture in March 2003.
Andrea Prasow, a Human Rights Watch lawyer who was at the hearing as an observer, said Khan could have received a longer sentence if convicted at trial, but the US government would now get the benefit of his assistance and could avoid confronting allegations that Khan and other prisoners were tortured.
"They get a lengthy sentence, minimum 19 years with co-operation, and no one has to hear about what happened to him when he was in CIA custody," she said outside the court.
There were four previous plea bargains at Guantanamo and Prasow expects more.
"There is a stronger incentive to plea bargain in Guantanamo if you have no idea how long you will be held or if you will ever be released or if you will ever get a fair trial," she said.