The judges said Canada breached Khadr's rights by sending intelligence agents to interrogate him in Guantanamo Bay in 2003 and 2004 and sharing the results with the US.

Khadr's continuing detention meant his rights were still being infringed, the judges ruled.

Legal process

Stephen Harper, the Canadian prime minister, who has steadfastly refused to request the return of Khadr, said the US legal process must be allowed to play itself out.

"It's pretty much the end of the road in terms of any hope of assistance from the Canadian government"

Nathan Whitling,
Khadr's lawyer

Khadr's lawyers have argued that Canada was complicit in his alleged torture and maintain that Harper is obliged under international law to demand the prisoner's return so as to protect children and to repudiate torture.

"They are essentially saying the government should do the right thing, but how can we believe this government will do the right thing? ... They have fought us every step of the way," Dennis Edney, a defence lawyer, said.

Nathan Whitling, another lawyer for Khadr, said their focus will now shift to Khadr's war-crimes trial at Guantanamo later this year.

"It's pretty much the end of the road in terms of any hope of assistance from the Canadian government, so our focus is now shifting away from that."

Khadr is now 23 years old, but he was only 15 when he was captured after allegedly killing an American soldier in a 2002 battle in Afghanistan.

Authorities say that his family has close links to al-Qaeda.

In April, a Canadian judge ruled that Harper's refusal to request Khadr's repatriation offended a fundamental sense of justice and violated his constitutional rights.

Canada's court of appeal dismissed the government's appeal of that decision last summer, by a majority 2-1 decision.

However, Friday's ruling overturned both those decisions.

Khadr is due to be tried by a special US military commission later this year.