A military jury has sentenced the former driver of Osama bin Laden, the al-Qaeda leader, to five and a half years in prison for supporting terrorism.
The sentence delivered on Thursday means that Salim Hamdan, a Yemeni citizen, would be eligible for release in less than six months.
However, the US government has previously argued that it has the right to continue to hold Guantanamo detainees as "enemy combatants".
Prosecutors had earlier called for Hamdan to serve at least 30 years in jail after being convicted the previous day of providing support to al-Qaeda, although he was cleared of conspiracy to commit war crimes.
Hamdan's trial was the first US military war crimes prosecution since the second world war.
Hamdan responded to the sentencing by thanking the jurors and repeating an apology for his support of bin Laden.
"I would like to apologise one more time to all the members and I would like to thank you for what you have done for me," he said.
Hamdan then smiled and embraced Charles Swift, his defence lawyer.
"The effect has been, that this jury of six military officers, bought the arguments of the defence rather than the arguments of their own government, as to how severe a threat he was and the severity of his crimes," Al Jazeera's Tom Ackerman, reporting from Guantanamo Bay, said.
Navy officer Keith Allred, the judge, noted that Hamdan had been given five years and one month credit for the time he spent behind bars since he was initially charged with terrorism by US authorities.
Allred said that after Hamdan has completed his sentence "I don't know what happens".
"I hope the day comes when you return to your wife and your daughters and your country," he said.
Bryan Whitman, a Pentagon spokesman, said: "At that time he will still be considered an enemy combatant. But he will be eligible for review by an administrative review board."
Under administrative review a panel at the US facility in Cuba will decide if Hamdan still poses a threat and whether he should be released from his detention.
Whitman said that Hamdan will be kept separate from the general detainee population at Guantanamo while he serves out his sentence.
Defence lawyers and human rights activists say they would challenge in the the US federal court any decision to continue to keep Hamdan in custody.
'Relationship of respect'
Hamdan told the court on Thursday he was stunned to learn bin Laden was behind the bombing of the warship USS Cole in 2000, but went back to work for him because he could not find another job that paid enough to support his family.
|Hundreds of prisoners remain in Guantanamo Bay prison [EPA]
"I couldn't beg," he told the Guantanamo court. "I had to work."
"It's true there are work opportunities in Yemen, but not at the level I needed after I got married and not to the level of ambitions that I had in my future," he said, reading in Arabic from a prepared statement.
He said he merely had a "relationship of respect" with bin Laden, as would any other employee.
Hamdam has been held at the detention centre for more than six years and faced 10 specific charges.
During the trial he said he denied the allegations against him, saying he worked for bin Laden only as a driver and had no knowledge of al-Qaeda attacks.
John Murphy, a one of the prosecutors, had called for a tough sentence, saying it would bring "a consequence so great that others will think again before they ally themselves with Osama bin Laden or the next Osama bin Laden".
The Bush administration has faced heated criticism over the Guantanamo Bay prison camp and the special tribunals, which operate under different rules to other military or civilian courts .
Hamdan was detained at a roadblock in southern Afghanistan in November 2001, allegedly with two surface-to-air missiles in his car.
It was the Bush administration's third attempt to try Hamdan, who won a US supreme court victory in 2006 that meant the first version of the Guantanamo court system was scrapped.
The charges against him were twice dropped and refiled.
His defence lawyers say he was subjected to abuse while in US custody, including humiliating interrogation tactics and sleep deprivation.