Open this photo in gallery Former Guantanamo Bay prisoner Omar Khadr leaves court in Edmonton, on March 25, 2019. JASON FRANSON/The Canadian Press

The last legal restrictions on Omar Khadr were lifted on Monday when an Alberta judge ruled that a war-crimes sentence for the former Guantanamo Bay prisoner has expired.

“I’m really happy with the decision today,” Mr. Khadr said outside Edmonton’s courthouse.

“It’s been a while, but I’m happy it’s here. Right now I’m just going to focus on recovering and not worrying about having to go back to prison or just struggling.”

Story continues below advertisement

The ruling means Mr. Khadr can apply for a passport as well as travel and visit freely.

“There’s nothing further for him to serve,” his lawyer Nathan Whitling said. “We don’t anticipate any further legal proceedings in the matter.”

Mr. Khadr was sentenced to eight years in 2010 by a American military court for alleged acts committed in Afghanistan when he was 15 years old. That sentence – which the Supreme Court of Canada ruled would be a youth sentence – would have ended last October had Mr. Khadr remained in custody.

But the clock stopped ticking when a judge freed him on bail in 2015 pending Mr. Khadr’s appeal of his military conviction in the United States.

Court of Queen’s Bench Chief Justice Mary Moreau ruled that the youth-crimes legislation allowed her to consider time he spent on bail as part of his sentence.

“The bail order must be considered in context,” she said.

“I order that Mr. Khadr be placed under a conditional sentence for one day, which I consider to be served.”

Story continues below advertisement

Faint sobs from Mr. Khadr’s supporters could be heard in court after Justice Moreau’s judgment.

Mr. Khadr has appealed the U.S. sentence. His lawyers say the military commission that issued it has been widely discredited.

Mr. Whitling had argued that the appeal hasn’t moved forward at all and it would be unfair to hold that against his client.

Lawyers for the Crown wanted Mr. Khadr to serve some time on conditional release in the community.

Mr. Khadr is also the defendant in a civil lawsuit by the family of the soldier he is alleged to have killed. A U.S. court has already ruled in favour of the family, who are trying to have the $134-million judgment served against Mr. Khadr in Canada.

Mr. Khadr spent years in U.S. detention at Guantanamo Bay after he was captured and accused of tossing a grenade that killed special-forces soldier Christopher Speer at a militant compound in Afghanistan in 2001.

Story continues below advertisement

Since he was released on bail, Mr. Khadr has lived in Edmonton and Red Deer, Alta., without incident. The court had eased some of his initial bail conditions, but several had remained. Justice Moreau’s ruling on Monday lifts them.

Mr. Khadr could not have access to a Canadian passport and was banned from unsupervised communication with his sister, who lives in the former Soviet republic of Georgia. He also had to notify his bail supervisor before leaving Alberta.

Mr. Khadr’s case has ignited divisive debate among Canadians over terrorism, human rights and the rule of law since it was revealed in 2017 that the federal government settled a lawsuit filed by him for a reported $10.5-million.

The payout followed a 2010 ruling by Canada’s Supreme Court that Mr. Khadr’s Charter rights were violated at Guantanamo and that Canadian officials contributed to that violation.