(CNN) -- The Canadian government has agreed to accept Guantanamo detainee Omar Khadr after he finishes a year of incarceration in U.S. custody, a spokeswoman for the Canadian Ministry of Foreign Affairs said.
"The American government agreed for Omar Khadr to return to Canada. We will implement the agreement between Omar Khadr and the U.S. government," said Melissa Lantsman, spokeswoman for the Canadian ministry.
Khadr agreed to plead guilty in exchange for a sentence of eight years, far less than the 40 years the military commission sentenced him to over the weekend. Part of the agreement was that he would be transferred to Canada to complete the incarceration.
Under rules of Canada's National Parole Board, Khadr could be eligible for parole after serving one-third of his sentence and could be released after serving two-thirds of the seven years, according to information sent out by the U.S. Department of Defense.
Khadr, a 24-year-old Canadian citizen, is the youngest detainee held at the detention facility at Guantanamo Bay, Cuba. He pleaded guilty last week to murder, attempted murder, providing material support for terrorism, spying and conspiracy.
Khadr admitted to throwing a grenade during a 2002 firefight in Afghanistan that killed Sgt. First Class Christopher Speer, a member of a U.S.Army Special Forces unit. Khadr was 15 at the time.
A key issue was whether Khadr was a willing participant in fighting American forces, or if he was involved because it was the course set by his father.
"Khadr admitted that prior to and during the firefight, he had the opportunity to safely leave but chose to stay and fight against the American and coalition forces. He admitted building and planting 10 land mines, intending to kill as many Americans as possible," said a statement from the U.S. Department of Defense, announcing Khadr's sentence.
A panel of military officers -- the equivalent of a jury in civilian courts -- on Sunday gave Khadr 40 years in prison. He will serve eight under the terms set by his plea agreement, the statement said. He faced a maximum of life in prison.
The Defense Department statement Sunday said Khadr was likely to complete his sentence in Canada after a year in U.S. custody.
From CNN's Adam Levine