TORONTO -- Canadian courts have no authority to grant Omar Khadr bail while he appeals his war-crimes conviction in the United States but should refuse to release him even if they do have the power, the federal government argues in a new legal brief.

Allowing Khadr out, Ottawa says in its filings, would undermine public confidence in the justice system, subvert international law, and damage Canada's relations with the U.S.

The brief prepared in response to Khadr's bail application notes that he pleaded guilty before a U.S. military commission in Guantanamo Bay and waived his right to appeal the conviction. It also states his transfer to Canada to serve out his sentence was done under a treaty that required the American legal proceedings to have been final.

His bail application -- to be heard March 24 and 25 in Edmonton -- constitutes a "direct violation" of his plea deal, Ottawa says.

"His transfer was premised upon an agreement that Canada would continue enforcement of this sentence," according to the brief, filed with the Court of Queen's Bench.

"Unless and until this sentence is varied or vacated by an American court of competent jurisdiction, Canadaàmust continue to enforce it."

Countries may be loathe to return Canadian convicts if they know bail is a possibility, the brief adds.

In October 2010, Khadr admitted to five war crimes -- including murder in violation of the law of war -- committed as a 15-year-old in Afghanistan in July 2002. In return, he was handed an eight-year sentence on top of the eight years he had already spent in pretrial custody.

He transferred to Canada in September 2012 under the International Transfer of Offenders Act and is incarcerated in Innisfail, Alta.

Now 28, the Toronto-born Khadr has since said he only pleaded guilty to get out of Guantanamo given that he faced indefinite detention even if he had been acquitted.

Khadr's stalled challenge also argues the widely discredited military commission had no right to try him given that what he pleaded guilty to were not crimes under international or U.S. law -- a view supported by several legal experts and even some American courts. He also says Washington failed to give his appeal waiver any legal effect.

As a result, he says, his U.S. war crimes appeal stands a good chance of success -- if it ever gets heard. While Ottawa says it would be inappropriate to weigh in on that point, it does say Canadian courts have no basis on which to consider the merits of his argument.

Khadr also insists the Alberta court does have jurisdiction to hear his bail application because the transfer act calls for his sentence to be administered under Canadian law. His filing describes him as a "model prisoner" who has support from an array of professionals.

While Conservative cabinet ministers have consistently branded Khadr a hardened, dangerous terrorist, the government's legal brief makes no such assertion.

It does, however, note that Khadr's conviction includes the equivalent of first-degree murder -- the hand-grenade death of U.S. special forces soldier Sgt. Chris Speer -- for which bail is rarely granted.

"This court must consider the seriousness of the offences to which the applicant has pled guilty as well as the facts underlying those offences that he has agreed to be true," the brief states.

Khadr has also applied for parole -- to be heard in June.