|It is still not clear when Hamdan could be freed from Guantanamo Bay [EPA]
Al Jazeera's Tom Ackerman reported from the Guantanamo Bay trial of Salim Hamdan, Osama bin Laden's former driver.
Here he examines what motivated Charles Swift, the US lawyer who defended him.
After his sentencing, for the first time Salim Hamdan broke into a smile, hugged his lawyers, waved to the court observers and in his meagre English, said: "Bye-bye everybody."
That is how the first Guantanamo detainee to stand trial left the courtroom, heading off to an isolated wing of the prison, still unsure when he would ever see freedom.
But the lawyers for Osama bin Laden's former driver were ecstatic.
The jury of six senior US military officers, having heard all the evidence, sentenced Hamdan to spend just five-and-a-half months more in prison.
For the defence team, which had pleaded for more than three-and-a-half years for an appropriate punishment, the result was far better than they had hoped for.
The decision was a blow to prosecutors, who had asked for a 30-year minimum after the jury acquitted Hamdan of war crimes but convicted him on a lesser charge.
|Swift says he paid a heavy personal price for defending Hamdan [EPA]
But the outcome was especially sweet for Hamdan's most passionate defender, Charles Swift, who pumped his fists in triumph as the jury announced its decision.
It was Swift who, as a career defence lawyer in the US navy, first took on Hamdan as a client in 2004, then stayed with the case after he was denied promotion and forced to retire from the military.
Swift says his passion for Hamdan's case also cost him his marriage. He had set aside other clients to devote all his energy to Hamdan's cause.
Swift's first win came in 2006 before the US Supreme Court, which found that under the Bush administration the original military tribunal process for those held in Guantanamo was illegal and violated the Geneva conventions and the military's own code of justice.
"If I have a choice between a military jury and a civilian jury, I'll take the military every time," Swift told me.
Officers with real-life experience in the battlefield, he said, had a better appreciation of the circumstances of war.
So when the prosecution painted Hamdan as a committed accomplice of al-Qaeda, Swift countered with evidence that his client was "not even a warrior".
Hamdan, he said, was just a driver for bin Laden who decided to work for $200-a-month because he could not otherwise manage to support his family back in Yemen.
Swift said that, as with any client, his goal was to humanise Hamdan in front of the jury.
Before the sentence was handed down, the lawyer allowed Hamdan to tell the jury he apologised for the innocent lives taken by al-Qaeda.
|Hamdan's fate will be decided by whoever is elected US president [AFP]
By contrast, Swift said, the prosecution had tried but failed to demonise the Yemeni driver.
Hamdan's fate is far from settled.
When his sentence ends next January, a new president in the White House will decide whether to keep Hamdan locked up as an "enemy combatant", as current law allows.
The law is currently being challenged in the US courts, but Swift says he is moving on to other causes because he can no longer devote the time, stamina and financial sacrifice required to carry on the fight.
Swift says despite the lenient punishment Hamdan received, Guantanamo-style justice still denies the accused the same protections that US civilian courts provide even the most heinous of criminals.
Whether or not justice was served is, of course, a matter of perspective.
In a note to a fellow soldier, a young National Guardsman from the US state of Wisconsin, who watched the trial along with the media, offered his take: "He goes home three months before we do! That's not fair."