A judge has ruled Omar Khadr's war crimes sentence has been served.

An Edmonton judge handed down a decision on the former Guantanamo Bay prisoner Monday morning.

"I'm really happy with the decision today," Khadr told media on Monday. "I think it's been a while, but I'm happy it's here."

The 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 his appeal of his military conviction.

Khadr was accused of tossing a grenade that killed U.S. Sgt. Chrisopher Speer during a 2002 firefight in Afghanistan. He was transferred to Canada and, in 2015, granted bail with three-and-a-half years left on his sentence.

Khadr's lawyer told the court he had served more than seven years in custody and on bail. The application asked the judge to place Khadr under conditional supervision for one day, and then declare his sentence served.

The Crown argued Khadr should serve the remainder of his sentence in the community. 

On Monday, Khadr was placed on conditional supervision for one day in addition to the judge declaring his sentence served.

"The net effect of the decision today is that Mr. Khadr's sentence is now over," Nate Whitling, Khadr's lawyer said. "There's nothing further for him to serve."

The Monday ruling means Khadr can contact his sister and apply for a Canadian passport.

He has appealed the U.S. convictions, claiming he confessed under duress, but no date has been set to hear that appeal.

With files from Bill Fortier