Almost 13 years after American soldiers captured him as a grievously wounded 15-year-old boy in Afghanistan, Omar Khadr found himself on the verge of his first taste of freedom on Friday after a judge granted him bail.
While his supporters were overjoyed at the unprecedented decision, a "disappointed" federal government immediately said it would appeal any interim release for the former Guantanamo Bay inmate.
"We have vigorously defended against any attempt to lessen his punishment," Public Safety Minister Steven Blaney said in a statement.
In her ruling, Court of Queen's Bench Justice June Ross found that Khadr has a constitutional right to apply for bail pending his appeal of five war-crimes convictions before a widely discredited American military commission.
She accepted evidence that he presents a low risk to public safety and has been a model prisoner — even though the federal government has branded him a hardened terrorist.
"This is a circumstance where balancing a strong appeal and the public confidence in the administration of justice favour the same result," Ross said in her decision.
"He has a strong basis for an appeal and the risk to public safety is not such that it is in the public's best interest that he remain in pretrial detention in a manner that could render his appeal irrelevant."
Ross did say Khadr would have to remain behind bars at least until May 5 while terms of his release are hammered out.
"Omar is fortunate to be back in Canada where we have real courts and real laws," Nate Whitling, one of Khadr's lawyers, said minutes after the decision.
There was no immediate word from the U.S. State Department.
The Toronto-born Khadr, now 28, is currently in the medium-security Bowden Institution in Innisfail, Alta., where he is serving out an eight-year sentence handed down by the military commission in Guantanamo Bay in 2010.
Khadr has said he only pleaded guilty to the war crimes he was accused of committing as a youth to get out of Guantanamo and be sent back to Canada.
Several prominent citizens in Edmonton — including academics and business people — offered their support for his bail application. His longtime lawyer, Dennis Edney, and wife, Patricia Edney, offered to take him into their home.
Patricia Edney welcomed the prospect in light of Ross's decision.
"Sounds good to me," she said.
Dennis Edney, who has long championed Khadr's case, was thrilled at the unprecedented decision, which, he said, had been a long time coming.
"The Canadian government should never have allowed Omar to be in Guantanamo," Edney said. "It should be held accountable for participating in his torture there."
Whitling had argued in court that Khadr's appeal of his conviction stood a good chance of success — especially in light of other American court decisions — but was dragging on, meaning it might never be resolved before his sentence expires.
For its part, the government argued Ross had no jurisdiction to hear the bail application from an offender convicted abroad and returned to Canada. Giving him bail would undermine Canada's international relations and obligations, the government argued — a position Ross rejected.
It also urged her to take into account the fact that Khadr pleaded guilty to serious offences — including murder, in violation of the laws of war for the death of an American special forces soldier following a fierce firefight in Afghanistan in July 2002.
Edney rejected the government's characterization of his client as terrorist.
"Canadians will see and meet a different Omar Khadr than the one wrongly portrayed by the Harper government," he said.
Next month, the Supreme Court will hear the government's appeal of an Alberta court's decision that Khadr should have been treated as a juvenile offender.
In June, he applies for parole for the first time. He is eligible for statutory release in October 2016, after serving two-thirds of his sentence, which expires in 2018.
A look at the long legal odyssey of Canadian born Omar Khadr:
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.
1996: The Khadr brothers begin attending weapons training camps affiliated with the Taliban and bin Laden. The family makes annual trips to Canada to raise money and collect supplies.
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 throws a grenade that kills U.S. Sgt. 1st Class Christopher Speer. Khadr is injured in the melee.
October 2002: Khadr is transferred to Guantanamo Bay.
February 2003: Investigators from the RCMP and the Canadian Security Intelligence Service (CSIS) interview Khadr at Guantanamo.
March 2004: Khadr's grandmother, Fatmah Elsamnah, launches lawsuit against the Department of Foreign Affairs, alleging Ottawa failed to protect her grandson's rights as a Canadian. Elsamnah later launches a similar suit against U.S. authorities.
Aug. 10, 2005: A Federal Court judge says Canadian agencies, including CSIS, are violating Khadr's Charter rights by turning information gleaned in interviews over to U.S. investigators.
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.
February 2006: A U.S. civil court orders the Khadr family to pay $102 million to Speer's widow and a second soldier injured in the 2002 attack.
March 17, 2008: Khadr alleges that he was threatened with rape and violence by interrogators seeking to extract a confession.
May 23, 2008: The Supreme Court of Canada concludes that Canadian officials illegally shared information about Khadr with the U.S.
Aug. 14, 2009: Canada's Federal Court of Appeal upholds ruling that requires the Canadian government to press for Omar Khadr's return from Guantanamo Bay.
Jan. 29, 2010: Canada's Supreme Court overturns court orders requiring the Canadian government try to repatriate Khadr, despite agreeing that Khadr's human rights are being violated.
July 7, 2010: Khadr tries to fire his three American lawyers, including a military court-appointed military lawyer, saying he has no chance at a fair trial. A judge later refuses to allow it.
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.
May 26, 2011: The Convening Authority for Military Commissions rejects a clemency appeal filed by Khadr. The prisoner had appealed to have his sentence cut in half, arguing that improper testimony swayed the jury at his sentencing hearing.
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 says he plans to appeal the terrorism convictions.
May 28, 2013: Khadr is transferred to the maximum security Edmonton Institution.
Sept. 23, 2013: An Edmonton judge hears arguments on whether Khadr is actually serving a youth sentence and should be transferred to a provincial jail.
Oct. 18, 2013: Khadr is denied a transfer to a provincial jail.
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.
July 8, 2014: Alberta's Appeal Court grants an application that Khadr to be transferred to a provincial jail but his lawyers later consent to a stay of the ruling.
March 26, 2015: Khadr asks for bail pending outcome of his appeal in the United States of his conviction for war crimes.
April 24, 2015: Albert judge rules on Khadr's bail application.