A look at the long legal odyssey of Canadian born Omar Khadr (view an interactive version below):
1986: Omar Khadr is born in Toronto on Sept. 19, but lives with family in Pakistan until 1995.
1995: Khadr's father is arrested in connection with the bombing of the Egyptian embassy in Islamabad, but is freed after then-prime minister Jean Chretien raises the arrest with Pakistani Prime Minister Benazir Bhutto.
1996: After briefly returning to Canada, the family moves to Jalalabad in Taliban-controlled eastern Afghanistan, where they live in Osama bin Laden's compound.
July 27, 2002: Two Afghan government soldiers are killed and several U.S. troops sustain injuries as coalition forces move in on Khadr's compound. Khadr is accused of throwing a grenade that kills U.S. Sgt. 1st Class Christopher Speer. Khadr is badly wounded.
October 2002: Khadr is transferred to Guantanamo Bay.
2004: Khadr files a civil lawsuit against the federal government.
Nov. 7, 2005: The U.S. military charges Khadr with conspiracy, attempted murder and aiding the enemy in connection with the deadly 2002 skirmish that killed Speer.
March 17, 2008: Khadr alleges that he was threatened with rape and violence by interrogators seeking to extract a confession.
Aug. 9, 2010: Khadr officially pleads not guilty to five war crimes charges, including murder, at a pre-trial hearing. Judge Col. Patrick Parrish rules Khadr's confessions will be admissible as evidence.
Oct. 25, 2010: Amid talk of an agreement, Khadr changes his plea to guilty on all five counts; gets opportunity to apply for a transfer to a Canadian prison after one year in a U.S. facility.
Oct. 31, 2010: Jurors sentence Khadr to 40 years in prison for war crimes but a pre-trial deal limits the actual sentence to eight years.
April 2012: U.S. Defence Secretary Leon Panetta signs off on Khadr's transfer.
Sept. 29, 2012: A U.S. military airplane brings Khadr back to Canada. He is transferred to the Millhaven Institution near Kingston.
April 28, 2013: Khadr's lawyer announces he plans to appeal the terrorism convictions.
May 28, 2013: Khadr is transferred to the maximum security Edmonton Institution.
Dec. 18, 2013: A Federal Court judge rules Khadr's lawyers need to rework his civil lawsuit against the federal government, despite the government's arguments that Khadr's request to amend his lawsuit should simply be tossed. Khadr's proposed new claim seeks $20 million for Canada's alleged violation of his rights.
Feb. 11, 2014: Khadr's lawyer confirms his client has been transferred out of the federal maximum security prison in Edmonton to Bowden Institution, a medium-security prison near the town of Innisfail.
May 22, 2014: Speer's widow and an American soldier blinded by the grenade sue Khadr for close to $45 million.
Oct. 23, 2014: A Federal Court judge rules that Khadr should be allowed to claim the Canadian government conspired with the Americans to torture him and breach his rights. The ruling allows him to significantly expand his $20-million lawsuit against Ottawa.
December 2014: The Supreme Court of Canada decides to hear the federal government's challenge of Khadr's youth status. Khadr had already agreed to remain in federal prison despite a prior ruling by Alberta's top court in July that he should be moved to a provincial facility.
January 2015: Khadr seeks bail pending disposition of his appeal in the United States against his disputed conviction for war crimes.
April 24, 2015: An Alberta judge grants bail to Khadr. The decision was made at a hearing scheduled in Khadr's application for bail pending the outcome of his appeal in the U.S. of his conviction for war crimes. The federal government appeals the bail decision.
May 7, 2015: Alberta Court of Appeal Justice Myra Bielby ordered Khadr released on bail, turning down the federal government's request for a stay.
May 14, 2015: The Supreme Court rejects government efforts to have Khadr ruled an adult offender and says he should be in a provincial jail.
Aug. 19, 2015: Khadr is eligible for statutory release after serving two-thirds of his sentence as a youth.
Sept. 11, 2015: Alberta judge eases some bail conditions: Khadr's curfew is relaxed.
Sept. 18, 2015: Judge allows him to visit his grandparents in Toronto if he travels with his lawyer. He can also get rid of his monitoring bracelet.
March 2017: Khadr undergoes 19-hour operation in Edmonton on shoulder damaged during his capture in 2002.
April 2017: Khadr's official Canadian criminal record contains errors, such as referring to the military commission as "youth court," The Canadian Press reports.
July 4, 2017: Sources say the federal government will pay Khadr $10.5 million and apologize to settle his ongoing lawsuit against Ottawa.
July 7, 2017: Government publicly apologizes to Khadr. Sources say the $10.5 million payout has already taken place.
Mobile users, view a mapped timeline of Omar Khadr's legal odyssey.