Omar Khadr, once a Guantanamo inmate, freed on bail in Canada

EDMONTON, Alberta (Reuters) - Omar Khadr, a Canadian who was once the youngest prisoner held on terror charges at Guantanamo Bay, will be released on bail from an Alberta prison on Thursday while he appeals a murder conviction by a U.S. military tribunal.

Omar Khadr is shown in this handout photo released to Reuters on April 25, 2015. REUTERS/Bowden Institution/Handout via Reuters

A judge in an Alberta court ruled that Khadr, who was captured in Afghanistan when he was 15 and pleaded guilty to killing a U.S. soldier, can be released on bail, denying an appeal by the Canadian government to keep him in custody.

Khadr, 28, was transferred to Alberta from prison at the U.S. naval base at Guantanamo Bay in Cuba in 2012.

He was the first person since World War Two to be prosecuted in a war crimes tribunal for acts committed as a juvenile.

The Khadr case has divided Canadians. While the government has opposed his release, human rights advocates such as Amnesty International have argued that the one-time child soldier has been denied access to due process.

Bail conditions imposed by an Alberta court include that Khadr wears an electronic monitoring device, lives with his lawyer in Edmonton, observes a nightly curfew, and has only monitored contact with his family.

“I am delighted, incredibly delighted. It has taken too many years to get to this point,” Khadr’s lawyer, Dennis Edney, told reporters outside the Edmonton courthouse.

He said Khadr would speak to reporters on Friday to tell his story to the Canadian public.

A judge had ruled in April that Khadr should be released on bail, but the Conservative government of Prime Minister Stephen Harper appealed, arguing that his release would harm Canada’s relationship with the United States.

“We are disappointed with today’s decision, and regret that a convicted terrorist has been allowed back into Canadian society without having served his full sentence,” a spokesman for Public Safety Minister Steven Blaney said in a statement.

The Canadian Supreme Court ruled in 2010 that Canada breached Khadr’s rights by sending intelligence agents to interrogate him at Guantanamo Bay in both 2003 and 2004, and by sharing the results with the United States.

Khadr was taken to Afghanistan by his father, a senior al Qaeda member, who apprenticed the boy to a group of bomb makers who opened fire when U.S. troops went to their compound. A firefight followed, during which Khadr was blinded in one eye and shot twice in the back, and he was captured.