Over the next few days, a judge in Edmonton will decide whether or not to grant bail to Omar Khadr. Justice June Ross must weigh the interests of the Canadian government against the rights of Mr. Khadr. The latter should always trump the former. Bail should be granted, with the usual conditions.

Mr. Khadr, a Canadian, was captured in Afghanistan in 2002 by U.S. soldiers after a skirmish with militants. One U.S. soldier was killed, and Mr. Khadr, 15 at the time, was badly injured. He was eventually shipped to Guantanamo Bay. He spent 10 years there, and was abused and tortured more than once.

After his capture, the U.S. accused Mr. Khadr of throwing a grenade that killed the American soldier during the firefight. Reports about what happened are far from conclusive. The U.S. tried twice to convict Mr. Khadr of being an illegal enemy combatant in secretive military tribunals at Guantanamo. The first attempt failed; the second stalled.

Story continues below advertisement

The U.S. then explored the possibility of returning Mr. Khadr to Canada. In 2010, they struck a deal in which he pleaded guilty to one count of "murder in violation of the laws of war," as well as four other charges, in exchange for an eight-year sentence and the chance of being sent home to serve his time. He has been in prison in Alberta since 2012.

Mr. Khadr, now 28, has recanted his confession. He is appealing his convictions in the U.S. on the grounds that he was prosecuted retroactively for violating war-crimes laws that were created years after his capture. By all accounts, he is a model prisoner and well-adjusted, given what he's been through. No one debates this.

But lawyers for the Department of Justice argued this week that Mr. Khadr shouldn't get bail because Canada has an obligation to enforce the U.S. sentences of prisoners transferred home. "Omar Ahmed Khadr pleaded guilty to heinous crimes.... We have vigorously defended against any attempt to lessen his punishment for these crimes," says a spokesperson for the Minister of Public Safety.

Under different circumstances, we might agree. But Mr. Khadr was not tried in anything resembling a normal, First World legal process. He pleaded guilty under duress: He faced indefinite incarceration without trial unless he pled guilty. The crimes themselves were invented retroactively. The court did not follow normal American domestic or military law, and it denied standard legal protections to the accused, who was a child when he was captured.

Mr. Khadr has a valid appeal. He also, as a Canadian, has the right to challenge the legality of his convictions and the right to ask for bail during his appeal, no matter how inconvenient that might be to the government. Omar Khadr isn't in Guantanamo any more. The rules are different here.