The Supreme Court of Canada has ruled that it will not order the Harper government to ask the United States to return Omar Khadr to Canadian soil, though it says the terror suspect's constitutional rights have been violated during his incarceration.

The court handed down its decision Friday morning, after deliberating on the matter since a November hearing.

CTV's Roger Smith described the ruling as a half-loss, half-victory for both Khadr and the Harper government.

"The Supreme court has ruled unanimously in a 9-0 decision that Khadr's rights were violated by the Canadian government," he said from Ottawa.

"But, at the same time, the court is saying they are not about to interfere in the Crown prerogative of the government to make decisions in foreign affairs in this case," Smith added.

"In other words, they're reversing a lower court order that said Canada had to ask the United States to send Omar Khadr back to Canada."

For years Khadr, 23, has been held by the U.S. military in Guantanamo Bay, Cuba, on charges that he allegedly killed a U.S. soldier with a grenade when he was 15 years old.

Khadr's treatment is well-known-- his captors threatened and isolated him, and deprived him of sleep at times, by moving him from cell to cell.

Foreign Affairs and Canadian Security Intelligence Service officials questioned Khadr in February and September 2003, and they shared the information they received with American authorities.

Officials from Foreign Affairs again interviewed Khadr in March 2004, knowing he had been subjected to the so-called frequent-flyer treatment – a practice where he was moved from cell to cell to deprive him of sleep.

On Friday, the Supreme Court chided the government for taking part in conduct that violates Khadr's guarantee of fundamental justice under the Charter of Rights.

The way Khadr was interrogated as a teenager offended "the most basic Canadian standards," the court said.

Khadr's Edmonton lawyer, Dennis Edney, spoke to Â鶹ӰÊÓ Channel about the verdict, which he described as "disappointing."

"The Supreme Court appeared to agree with everything we said. It agreed that Omar Khadr, his Charter rights had been violated by the Canadian government. It also went on to say that his rights continue to be violated, the court even gave us costs for our hearing, it recognized that Omar Khadr needs some help and the government should do something," Edney said Friday morning.

"And yet, it (the court) wasn't prepared to exercise its constitutional imperative to make all citizens accountable under the law and that's disappointing."

NDP Leader Jack Layton expressed his disappointment with the court decision, saying that it played "right into Stephen Harper's hands."

"It's too bad," he added.

But Kory Teneycke, former spokesperson for the Prime Minister's Office, defended the court's decision on Khadr.

"These are very serious charges," Teneycke said on Â鶹ӰÊÓ' Power Play. "He deserves to stay in jail until he faces a trial, and I think he's probably today one step closer to life in prison in the United States."

"I don't think Canadians are going to be offended" by the ruling, he added.

The background

While the Harper government has long opposed bringing Khadr back to Canada, it lost two straight court decisions on the matter prior to the top court's ruling on Friday.

In April of last year, the Federal Court of Canada ruled the government must ask the U.S. to return Khadr "as soon as practicable."

That ruling was upheld by the Federal Court of Appeal in November, which said Canadian officials had "knowing participation" in Khadr's mistreatment when they interviewed him in March 2004 -- a time in which they knew he had been mistreated.

The court of appeal said the principles of fundamental justice do not allow for prisoners to be questioned for information after being subjected to cruel and abusive treatment to induce co-operation with investigators.

At the same November hearing in the Supreme Court, federal lawyer Robert Frater denied that Ottawa was complicit in any abuse of Khadr. And he urged the court to not open the door to perpetual second-guessing of Canada's foreign relations.

The government's position has long been that the U.S. military tribunal hearings initiated against Khadr in 2004 must be allowed to play out -- and also that the courts should not be dictating Canada's foreign policy.

But critics say the government should push for Khadr's return.

"The fact is, he's a Canadian citizen and we believe his rights ought to be protected," said Liberal Leader Michael Ignatieff Friday.

He added that the ruling still suggests that Khadr should come back to Canada.

"The court respects the independence of the executive branch, but I think the court is clearly saying to the government: 'Bring Omar Khadr home.' And we agree with them."

That opinion was echoed by Alex Neve, a spokesman from the human rights group Amnesty International, who said the court ruling is "a very strong ruling on the human-rights front."

Having Khadr's rights violations recognized by the court should compel Ottawa to take action in his case, Neve added.

"It is not open to the Canadian government to just yawn and not take that seriously," he said. "There has to be an effective response."

Khadr's family has received much attention in the past decade, as apparent long-standing ties to al Qaeda leader Osama bin Laden were revealed.

The accused terrorist's late father, Ahmed Said Khadr, was a purported extremist and financier for bin Laden's terror network.

One of Omar Khadr's brothers, Abdul Karim, was paralyzed by wounds suffered in the firefight that killed his father.

With files from The Canadian Press