Former Guantanamo Bay prisoner Omar Khadr will find out today in an Edmonton court if the remaining 3½ years of his sentence will be dismissed.

Khadr is seeking a dismissal of his U.S. military commission conviction for killing an American soldier in Afghanistan. His eight-year sentence, which was imposed in 2010, would have expired last year if Khadr had remained in custody.

Khadr has been out on bail since 2015. Court of Queen’s Bench Chief Justice Mary Moreau will decide whether the Alberta youth court has jurisdiction to alter the sentence and whether the sentence has effectively expired.

“Our position is that the court does have the authority to effectively end Mr. Khadr’s sentence now, even though technically there’s still three years and five months remaining to be served,” Khadr’s lawyer, Nate Whitling, told CBC News.

The prosecution argues Canada has international obligations to see that Khadr serves his full sentence.

Khadr spent several years in U.S. custody at Guantanamo Bay, Cuba, after he was captured in 2002 and accused of tossing a grenade that killed special forces soldier Christopher Speer in Afghanistan. Khadr was 15 at the time.

He was later transferred to Canada, where the Supreme Court ruled Khadr’s punishment was to be served as a youth sentence. Khadr was released on bail in May 2015 pending an appeal of his war crime convictions in the United States. Since then, he has lived in Edmonton and Red Deer without incident.

Last month, Whitling told the court Khadr’s U.S appeal hasn’t advanced “even an inch.”

Khadr received a $10.5-million legal settlement and an official apology from the Canadian government in 2017. Whitling said Khadr wants to move past the sentence and “get on with his life.”