Just hours after his release, Omar Khadr told the media, "Freedom is way better than I thought." Although he is free on bail, Khadr faces legal proceedings ahead of him that could last for years.

He was released in connection with the pending appeal of his conviction by a military commission in 2010 at the notorious Guantanamo Bay detention camp.

On May 14, Khadr also has a hearing at the Supreme Court of Canada in the federal government's appeal of an Alberta court ruling that he should be treated as a juvenile offender. He was 15 years old when he was taken into custody by American forces in Afghanistan.

After his release on bail, Omar Khadr, flanked by his lawyer Dennis Edney, speaks to the media in Edmonton on May 7. (Jason Franson/Canadian Press)

And on June 25, he has his first parole hearing. He has been eligible for full parole since July 1, 2013.

In her initial decision granting bail release, in April, Alberta Justice June Ross cited the work of law professor David Glazier in connection with Khadr's U.S. appeal.

Glazier, a leading expert on military commissions, teaches courses on the law of war and international law at Loyola School of Law in Los Angeles.

Before that, Glazier served 21 years in the U.S. navy, including as commander of the frigate USS George Philip.

Appeal likely to take years

Legal expert David Glazier says the charges levied against Omar Khadr aren't war crimes under international law, so the military commission that convicted him didn't have jurisdiction to do so. (Loyola Law School)

Glazier tells CBC News that Khadr's U.S. appeal will likely take at least several more years. The case is now before what's called the court of military commission review, with little progress to report after 18 months. And Glazier says the really significant rulings won't happen until the case reaches the federal court of appeals.

The key merit of Khadr's appeal, Glazier says, "is that he's being tried in a military court system which, as a matter of law, should only have jurisdiction over actual war crimes' allegations, and none of the charges that have been levied against him constitute war crimes, as recognized by international law."

Khadr's prosecution in 2010 "has no credible legal foundation," he adds.

Khadr pleaded guilty to five charges at the military commission, however, all related to events in Afghanistan in 2001-02.

Glazier doesn't think that guilty plea will complicate Khadr's appeal. It's part of the legal tradition in the U.S., and in Canada, he says, that "you can't plead guilty to something that a court can't try you for." Glazier says that Khadr's guilty plea shouldn't have any legal effect.

In an in-depth analysis of the five charges against Khadr, Glazier concluded "that none of Khadr's five charges described actual war crimes, even assuming the underlying factual predicates are true." That means the military commission didn't have jurisdiction.

Other Guantanamo appeals

Salim Hamdan, Osama's bin Laden's former driver, was convicted by a U.S. military court in 2008, but an appeals court overturned that conviction in 2012. (Prof. Neal Katya/Associated Press)

Other U.S. court rulings look generally positive for Khadr's appeal, Glazier says.

In 2012, a U.S. appeals court overturned the conviction of Osama bin Laden's former driver and bodyguard, Salim Hamdan, under a charge of providing material support for terrorism, a charge in Khadr's case as well. Because there was no such war crime under international law of war at the time, the judges, all Republican appointees, threw out the verdict.

Hamdan's original trial, in 2008, was the first one to take place before a Guantanamo military commission. He was released to Yemen, his home country, later that year, as he had been in U.S. captivity since 2001.

Last year, in the case of Ali al-Bahlul, a bin Laden propagandist who received a life sentence, that same appeals court, the Circuit Court for the District of Columbia, set aside two of his three convictions, once again because there was no such war crime at the time of Bahlul's alleged actions. The court should soon release its ruling on the third charge, conspiracy, which Khadr also faced.

Australian David Hicks won a legal challenge on Feb. 18, when the U.S. court of military commission review struck down his 2007 conviction at Guantanamo, in a unanimous ruling. (Rob Griffith/Associated Press)

Glazier says the ruling will be crucial for Khadr. If the judges decide the charges must be based on international law of war, then it has significant potential for undermining the government's case against Khadr. If not, it could leave the questions about the other charges Khadr faces open to dispute, Glazier notes. That may require Khadr to go through the full appeal process.

Those other charges Glazier refers to are murder in violation of the law of war and attempted murder in violation of the law of war.

But Glazier, the former military officer, adds, "the law of war does not criminalize throwing a hand grenade or shooting at soldiers; that is, in fact, what militaries around the world are called upon to do."

Military tribunals vs. domestic courts

Rather than resort to a military tribunal reviewing Khadr's alleged actions as a violation of the law of war, Glazier says, the government should have pursued a conviction on ordinary crimes in a domestic court.

David Glazier says prisoners in Camp Delta at Guantanamo Naval Base in Cuba should be tried in civilian courts, not military courts. (Mark Wilson/Reuters)

In February the court of military commission review struck down, on technical grounds, the 2007 conviction of Guantanamo detainee David Hicks. He returned home to Australia later that year.

Both Hicks and Khadr went through the same waiver process to block them from appealing their convictions, so Glazier expects either the military commission or the circuit court will hand Khadr a win on that issue.

Glazier argues the U.S. government should be using civilian courts rather than military commissions. He says that if it had done that with the case of alleged Sept. 11 mastermind Khalid Sheikh Mohammed, he would have probably gone through the complete legal process and been executed by now, if that was the sentence. Instead, he hasn't been tried yet.

"There's no plausible reason for the government to be using these military commissions, they're really just a complete failure on every level," Glazier says.