Australian David Hicks faces a maximum sentence of seven years in jail for aiding al-Qaeda, as part of a plea deal at a Guantanamo Bay military tribunal.
Hicks was the first detainee to face the new judicial process
The judge formally accepted Hicks's guilty plea to providing material support for terrorism, as part of an agreement limiting his sentence.
Under the deal, Hicks also withdrew claims he was abused in US detention.
He will serve his term in Australia. It is in addition to the five years he has already spent at the prison camp.
The 31-year-old pleaded guilty on Monday to providing material support for terrorism, in the first case to be heard by the special tribunals.
At Friday's hearing, Hicks had to convince the military judge that his guilty plea was genuine and not just a tactic to return home to Adelaide, where he will serve his sentence.
Because of his guilty plea, the prosecution team earlier indicated that Hicks would face "substantially less" than the 20-year sentence previously sought.
He became the first person convicted by a US war crimes court since World War II.
A panel of eight military officers was then selected to decide his sentence.
His transfer from Guantanamo Bay is to take place within 60 days of sentencing, which is expected to be announced at some time over the weekend.
Hicks was led into the hearing by two guards. Instead of the prison uniform that he wore earlier in the week he was wearing a suit, and his hair, which had grown down his back, was cut short.
Showing little emotion, the Australian confirmed he had attended al-Qaeda training camps in Afghanistan and had fought with the Taleban in 2001, under the alias Abu Muslim Australia.
The military judge asked him if he understood the facts of his plea and if he believed the tribunal could prove the charge beyond reasonable doubt - to which Hicks replied: "Yes, sir".
Under the plea bargain, Hicks also agreed to withdraw allegations he had been abused during his detention by the US military.
Hicks affirmed he had "never been illegally treated by any persons in the control or custody of the United States" before or after his transfer to Guantanamo in 2002.
The Australian had previously alleged he was beaten by US forces after his capture in Afghanistan and that he had been sedated before learning of the charges against him.
Hicks's father, Terry, has said his son made the guilty plea in order to return to Australia.
Hicks's hearing was the first under a new military tribunal system introduced for the detainees, a system which has been condemned by human rights groups.
Australian Prime Minister John Howard said earlier this week that he welcomed the progress towards the resolution of Hicks' case, although he expressed concern over the amount of time it had taken.
But the Center for Constitutional Rights, which represents many of the detainees, condemned the proceedings.
The US has said it plans to use the new tribunal system to prosecute about 80 of 385 prisoners remaining at the camp.