Canadian captive Omar Khadr pleaded guilty to all five terrorism charges against him in the US war crimes tribunal at the Guantanamo Bay naval base as part of a deal that would limit his sentence.
Khadr, who was captured in Afghanistan at age 15 and is now 24, admitted he conspired with al Qaeda and killed a US soldier with a grenade in Afghanistan.
Before finalising the plea, the judge said he would question Khadr to ensure the defendant understood he was waiving his right to appeal.
Terms of the plea deal were not immediately disclosed, but lawyers had reportedly discussed an agreement that would let Khadr serve one more year at Guantanamo and then seven years in Canada.
The plea deal would end a widely criticized trial that made the United States the first nation since World War Two to prosecute someone in a war crimes tribunal for acts allegedly committed as a juvenile.
Khadr is the second man to plead guilty in the tribunal during the administration of President Obama, whose efforts to close the detention camp have been blocked by Congress.
He is the fifth captive convicted since the United States established the tribunals to try foreign captives on terrorism charges after the 11 September attacks in 2001.