Omar Khadr will remain in a federal prison.

The former Guantanamo Bay detainee has agreed to a stay of a decision by Alberta's top court that ruled he should be serving his sentence as a youth and be transferred to a provincial jail.

His lawyers say he's willing to remain at the federal Bowden Institution in central Alberta because he's doing well there.

And they believe he will still be able to apply to a youth court judge for release.

Khadr pleaded guilty in 2010 to five war-crimes charges, including murder, for killing an American soldier in Afghanistan when he was 15.

After spending a decade in Guantanamo Bay, Khadr was sentenced by a U.S. military commission to an additional eight years and shipped to Canada.