Omar Khadr is a free man

An Alberta judge has ruled that a war crimes sentence for former Guantanamo Bay prisoner Omar Khadr has expired.

An eight-year sentence imposed in 2010 would have ended last October had Khadr remained in custody.

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

Chief Justice Mary Moreau says the Youth Criminal Justice Act gives judges flexibility to consider bail conditions as part of a sentence.

With that in mind, she ruled that Khadr has served his time.

Khadr's lawyer Nathan Whitling had argued in an Edmonton court that Khadr had served more than seven years in custody and on bail.