Omar Khadr is not coming home yet - but the Supreme Court of Canada has moved his repatriation considerably closer.
In an 9-0 ruling this morning, the Court said that Canada violated Mr. Khadr's Charter rights by participating in illegal interrogation methods which included sleep deprivation.
It stressed that the constitutional breach is ongoing and "continues to this day."
However, the court said that before stepping in to dictate a Canadian response on a sensitive question of foreign policy, the federal government must be given a chance to rectify Mr. Khadr's plight.
But should the government fail to act, the court warned that it has the power to move more overtly to aid Mr. Khadr.
The Court upheld an earlier Federal Court decision that Mr. Khadr's right to life, liberty and security had been violated, but it refused to go as far as the lower court had gone in ordering Mr. Khadr to be brought home.
"Consistent with the separation of powers and the well-grounded reluctance of courts to intervene in matters of foreign relations, the proper remedy is to grant Mr. Khadr a declaration that his Charter rights have been infringed, while leaving the government a measure of discretion in deciding how best to respond," the Court said.
However, the judges could scarcely have been tougher in their finding that Mr. Khadr was mistreated during interrogations in 2003 and 2004.
"Canadian officials questioned Mr. Khadr on matters that may have provided important evidence relating to his criminal proceedings, in circumstances where they knew that Mr. Khadr was being indefinitely detained, was a young person, and was alone during the interrogations," it said.
"Interrogation of a youth to elicit statements about the most serious criminal charges - while detained in these conditions and without access to counsel and while knowing the fruits of the interrogations would be shared with the U.S. prosecutors - offends the most basic Canadian standards about the treatment of detained youth suspects."
Watch video of the Khadr interrogation
Since the information obtained in the interrogation sessions may still be used against Mr. Khadr in the U.S proceedings, the Court said that, "the effect of the breaches cannot be said to have been spent."
However, it noted that the fluid state of terrorism proceedings in the U.S at the moment dictates that courts ought to take a cautious approach and defer to government officials, who have a much broader and more nuanced sense of foreign policy considerations and the details of Mr. Khadr's case.
But if the government refuses to take adequate action to rectify the abuse of Mr. Khadr's rights, the Court warned, "courts are empowered to make orders ensuring that the government's foreign affairs prerogative is exercised in accordance with the constitution."
Advocates for Mr. Khadr showed disappointment that the Court did not directly order Mr. Khadr's repatriation, but focused on its clear finding of a continuing rights violation.
"The government can continue to sit on its hands - and therefore look like it is being completely unresponsive to a unanimous decision from the highest court in the land," said Alex Neve, a spokesman for Amnesty International.
Mr. Neve said that repatriation continues to be the best possible solution to remedy Canada's illegal acts.
"We are not at all naïve here," he said. "Clearly the government has dug in its heels for several years now. We are not naïve enough to think it will happen without pressure.
"We are not going to wait six months. We are not going to wait six months. We want there to be a reaction to this decision immediately."
Sukanya Pillay, security director of the Canadian Civil Liberties Association, said the ruling means "in effect, they have thrown the ball back into the government's court - but with clear rules."
"The judicial branch doesn't want to tread on the executive branch, but they have given clear signals," she said.
"The important thing is they have said we are willing to look at whether the government action is unconstitutional...Now, the important thing is what happens next. It was vague before as to why we would have to do anything. Now it is clear why because there is a clear constitutional breach."
Ms. Pillay declined to even discuss other options besides repatriation. "Its our constitutional law that when there is a breach of our Charter, there has to be a remedy," she said. "It is clear now that there was a breach to Section 7 of the Charter - and the government has to act."
If Mr. Khadr is repatriated, she said that there is no reason he cannot be tried in a Canadian court. Any evidence that was illegally obtained would be subject to Canadian rules of admissibility - as it ought to be - she said.
The Court had been presented with two starkly different options at Mr. Khadr's hearing last November. The first was to order the 23-year-old man's repatriation based on his rights having been violated during interrogation sessions.
The alternative - urged by lawyers for the federal government - was to adopt a hands-off attitude and let the U.S. go about prosecuting Mr. Khadr before a military commission.
The case was as politically-charged as any the Court has heard in recent years; a battle over the notion that judges can tie government hands on matters of foreign policy where constitutional rights are at stake.
Lawyers for a host of human rights organizations exhorted the Supreme Court to flex its constitutional muscle and come to Mr. Khadr's rescue.
The pro-Khadr groups depicted him as being not a terrorist, but a frightened child who wept for his mother after his arrest and implored his country to help him. They contended that Canada's passive stand in the case made it little better than the troops who subjected Mr. Khadr to sleep deprivation and shone bright lights for hours in his wounded eyes.
Mr. Khadr's supporters also made it clear that by insisting on Mr. Khadr's repatriation, the Court would be saying that the federal government effectively colluded in an extreme abuse of a citizen's rights abroad.
By the time the Court heard the appeal last fall, the federal government had ratcheted up the pressure by bluntly warning the Court that it would brook no interference with its long-held view that Mr. Khadr must remain in the U.S. court system until his case has been resolved.
Mr. Khadr was severely wounded in 2002 when he allegedly tossed a grenade that killed a U.S. Special Forces medic. He was charged with murder in the death of a U.S. medic and scheduled to go before a Guantanamo Bay military commission.
However, U.S. President Barack Obama effectively shut down the commission system this year before Mr. Khadr could be tried. Mr. Khadr remains in Guantanamo, along with more than 100 other terrorism suspects.
The decision under appeal was issued last year by Federal Court Judge James O'Reilly. He found that the government had failed to ensure that Mr. Khadr's treatment complied with international human rights norms, and ordered the government to seek his return.
By adopting a passive stance while Mr. Khadr was in U.S. hands, Judge O'Reilly found that Canada had been complicit in tortures, which included sleep deprivation and the use of vicious dog to intimidate him.
Judge O'Reilly found that there is a constitutional "duty to protect" Canadian citizens imprisoned abroad if they are abused in a manner that infringes their rights under the Canadian Charter of Rights and Freedoms.
On appeal the Federal Court of Appeal upheld the ruling by a 2-1 margin.
At one point in the hearing, Chief Justice McLachlin expressed concern that, with Mr. Khadr's mistreatment in the distant past, it might be too late for the courts to take drastic action.
"He has suffered greatly, perhaps, and with great consequence," she said. "But how does repatriation fix that?"
Other judges also worried about the long-term ramifications of coming to Mr. Khadr's rescue.
However, Nathan Whitling - a member of Mr. Khadr's legal team - tried to put their concerns to rest by assuring the Court that Mr. Khadr was not claiming that the government was under a legal duty to take diplomatic measures on behalf of any Canadian held by authorities abroad.
Mr. Whitling said that the Khadr case was unique; that the elements of torture and illegality present in the Guantanamo military process created "special circumstances" that amounted to a breach of Mr. Khadr's Charter right to life, liberty and security of the person.
Federal lawyers put up stiff resistance, warning the judiciary not to create a foreign-policy nightmare by micromanaging sensitive situations abroad involving Canadians.
"The government has the right to decide what requests should be made, how they should be made, and when they should be made," federal lawyer Robert Frater argued. "The courts are not in the best position to do that."
Prime Minister Stephen Harper has himself argued that Mr. Khadr doesn't deserve the protections afforded child soldiers by international conventions. "To be a child soldier, you have to be in an army," he said last year, echoing a U.S. claim that the 15-year-old was an "unlawful combatant."
While Mr. Khadr faces life in prison if convicted, most legal observers believe that he would walk free based on time already served if the Harper government would agree to allow him to return home.
Indeed, the Obama administration has hinted it might revisit the case if the Supreme Court were to rule against Mr. Khadr's repatriation.