Canada’s infamous child soldier, Omar Khadr, should have been freed from jail years ago. Now 28, he has spent nearly half his life behind bars for the death of an American soldier in Afghanistan when he was 15. But Prime Minister Stephen Harper’s government isn’t done with him yet.

In hearings before an Edmonton judge this past week federal lawyers made a legal case that no Canadian court has the authority to grant Khadr the bail he has requested as he appeals his conviction by Guantanamo Bay’s discredited military tribunal; that doing so would violate Canada’s international obligations under a treaty that lets Canadians convicted abroad serve their time here; and that it would jeopardize relations with our close ally.

As the Star’s Michelle Shephard reports, Justice June Ross now has the unhappy task of sorting out the fine points of law and diplomacy as she weighs the tortuous arguments pro and con. It’s no simple affair.

But one thing is clear: Khadr has done more than enough time. He presents no credible threat to Canadian society and should be set free to take up an offer to live with the family of his longtime Edmonton lawyer, attend a Christian university there and rebuild his life. He has already been behind bars nearly twice as long as he would have, had he been convicted here in Canada of first-degree murder as a young offender.

Apart from the bail application, Khadr has a separate request for parole before the Parole Board of Canada that deserves a speedy stamp of approval, whatever comes of the bail hearing. He should have been out years ago.

This is not to whitewash his tainted past. Khadr belonged to an Al Qaeda-linked family and pleaded guilty to killing U.S. Sgt. Christopher Speer in 2002 during a firefight in Afghanistan in which he was captured. He spent a decade at Gitmo, where he was tortured and abused. The plea deal, in 2010, was cobbled together under duress. Khadr faced indefinite imprisonment without trial unless he pleaded guilty. He got an eight-year sentence, and a chance to serve most of it here. He was brought home in 2012. He will be eligible for statutory release next year, after serving two-thirds of his sentence, which expires in 2018.

Once back in Canada Khadr recanted his confession, denying that he threw the grenade, and he is now appealing his conviction before an American military tribunal review panel. He is seeking bail here pending the outcome of that appeal. His lawyers argue that the crime for which he was convicted, “murder in violation of the laws of war,” wasn’t a recognized offence in 2002. It only became so years after his capture, when the U.S. rewrote the book on war crimes in the wake of the Sept. 11, 2001, Al Qaeda attacks.

However the courts, Canadian and American, sort out this legal tangle, the Parole Board of Canada has no sound reason to prolong his incarceration. Khadr has paid whatever debt he owes, and more. It’s time he got a chance to move on.