The war-crimes prosecution of Canada's Omar Khadr in Guantanamo Bay could set a dangerous precedent and lead to widespread prosecutions of children, a UN envoy said Wednesday.

Radhika Coomaraswamy called on Canada and the United States to treat Khadr as a child soldier as demanded under international protocols, and for his release into Canadian custody.

Coomaraswamy's comments came as several witnesses at Khadr's hearing noted how young the badly injured teen seemed when captured almost eight years ago.

In an interview from New York, the UN secretary general's special representative for children and armed conflict said international criminal courts have declined to prosecute minors.

"The international courts, as they stand at the moment, are not prosecuting children under the age of 18," Coomaraswamy told The Canadian Press.

"Trying young people for war crimes with regard to acts committed when they are minors could create a dangerous international precedent."

The concern, she said, is the U.S. prosecution will open the door for children around the world to be tried for war crimes, despite near universal consensus they cannot be held responsible in the way adults should be.

Khadr is facing prosecution before a widely condemned military commission for alleged crimes he committed as a 15 year old.

The U.S. accuses him throwing a hand grenade that killed a special forces soldier in July 2002 after American forces attacked a compound in Afghanistan.

Now 23, the Toronto-born Khadr is into a second week of pre-trial hearings at which his lawyers are trying to have self-incriminating statements thrown out as the products of torture.

Khadr, who was taken to Afghanistan by his father as a child, has maintained that he was threatened with rape, held in stress positions, and otherwise abused.

Various witnesses have described interrogations of the teenage Khadr, who was taken from the destroyed compound to Bagram hospital with horrific bullet and shrapnel injuries.

A common thread among several witnesses -- interrogators and guards -- has been Khadr's youth, with one on Wednesday describing him as "immature," and looking like a "beat-up" kid.

One Bagram guard, nicknamed "The Monster," testified Khadr was a "child who had been blown up, shot and grenaded" and was likely in "excruciating pain" during early interrogations.

The commission earlier heard a witness describe seeing a hooded Khadr shackled, with his arms above eye level, to his cell door.

Khadr is the lone westerner still held at Guantanamo Bay, where he has been a prisoner since October 2002.

He is also the youngest detainee among 181 inmates still at the infamous facility, which U.S. President Barack Obama had pledged in January 2009 to close down.

Coomaraswamy said minors who commit war crimes should not simply be set free.

"We are just asking for a more rehabilitation-oriented process."

Khadr, she said, should be repatriated to Canada and reintegrated into society.

Her call echoes a chorus of similar pleas from international legal and human-rights groups, which have condemned the military prosecutions in general and Khadr's prosecution in particular.

Prime Minister Stephen Harper, however, has bluntly refused to press for Khadr's repatriation, saying the U.S. prosecution must first play itself out.

Khadr is slated to stand trial in July, but the start will likely be delayed after the prosecution won approval from the presiding judge, Col. Patrick Parrish, to do its own mental-health assessment.

Khadr's lawyers have yet to say whether he will co-operate.