U.S. NAVAL BASE GUANTANAMO, Cuba — Omar Khadr has pleaded guilty to five war-crimes charges, including murder, in a deal with the Pentagon that limits his sentence and could see him return to Canada within a year to serve his remaining time.

In a hearing here Monday before a U.S. military tribunal, Khadr pleaded guilty to the five charges against him: murder and attempted murder in violation of the law of war, providing material support to terrorism, conspiracy and spying.

The precise terms of the plea deal, negotiated by Khadr's defence team and U.S. authorities, will not be released until sentencing hearings are completed this week.

But it is believed that, under the plea bargain, his sentence will be capped at eight years. After serving one more year in U.S. custody, he can apply to be transferred to a Canadian facility.

The agreement creates an awkward situation for the Harper government, which has repeatedly refused to intervene, saying it would let the U.S. military-court process run its course.

The administration of U.S. President Barack Obama, still hoping to live up to his promise to shut down the controversial detention camp in Guantanamo, has been negotiating with other countries to repatriate prisoners who have been convicted or released.

During Khadr's hour-long court hearing Monday, the judge confirmed that diplomatic notes have been exchanged between Canada and the United States, which are attached to the plea bargain. While their content will not be released in court until later this week, Khadr's lawyers said Monday that they spell out that Khadr's transfer to Canada will be viewed favourably.

Despite Canada's behind-the-scenes endorsement of Khadr's plea bargain, the Harper government did not budge Monday from its steadfast position that it is up to the U.S. justice system to decide the fate of the young Canadian citizen. The Prime Minister's Office and the Foreign Affairs Department refused to acknowledge a deal was in the works.

Khadr could have faced life in prison if convicted on all counts.

He wore a dark grey suit and neatly trimmed beard for his hearing in the hilltop courtroom that he first entered 4 1/2 years ago as a teenager.

Seated at a table beside his U.S. military lawyers and his Canadian attorney, Khadr looked down and held his head in his hands. He answered "yes," over and over, admitting his guilt as the judge, army Col. Patrick Parrish, went over each of the charges.

He admitted to throwing a grenade that killed a U.S. medic, Sgt. First Class Christopher Speer, after a four-hour firefight between al-Qaida and U.S. forces in Afghanistan in July 2002.

He also acknowledged the court's jurisdiction to try him, admitted he conspired with al-Qaida to carry out terrorist attacks and acknowledged making and planting roadside bombs targeting U.S. forces in Afghanistan.

Vancouver lawyer John Conroy, who specializes in offender transfers, said that Khadr cannot officially apply for a transfer to Canada until after he is sentenced. The federal government then would have to show that Khadr is a "threat to the security of Canada" to deny him a transfer to a Canadian prison once it has been approved by the United States.