On his first evening of freedom since he was 15 and threw a grenade at U.S. soldiers in Afghanistan, a smiling, relaxed Omar Khadr said he hopes Canadians will try to get to know who he is now.

"I would like to thank the Canadian public for trusting me and giving me a chance. I will prove to them I am more than what they thought of me. I will prove to them I'm a good person. . . . I'm excited to start my life."

Eight hours earlier, an Edmonton judge ordered Mr. Khadr, now 28, released on bail, rejecting a last-ditch attempt by the Canadian government to keep him in prison, and releasing him under the supervision of Dennis Edney, his long-time lawyer.

Story continues below advertisement

After his release, the former Guantanamo detainee went for lunch, then returned to the courthouse for some paperwork. There, he encountered some government officials. "I was surprised. Some of the sheriffs went out of their way to be kind and buy me some drinks," he told reporters who gathered to meet him at Mr. Edney's comfortable Edmonton home.

The driveway news conference was the beginning of a new chapter in a saga that started when Mr. Khadr, a Canadian citizen, was a child in al-Qaeda leader Osama bin Laden's training camps, absorbed the attention of the federal government and the Supreme Court of Canada, and polarized the country.

He spoke without any reference to notes in unaccented English, taking several questions from reporters.

He rejected terrorism, saying he would tell anyone who asks that education can help people avoid being manipulated. A reporter asked what he would tell Americans, and he said, "I'm sorry for the pain I caused.… There's nothing I can do about the past. I hope I can do something about the future."

He was asked what he would say to Prime Minister Stephen Harper, who, along with members of his cabinet, called on Canadian courts to punish him severely. "I'm going to have to disappoint him. I'm better than the person he thinks I am."

The bail release order from Justice Myra Bielby of the Alberta Court of Appeal was yet another major legal defeat for the Conservative government, which has seen the courts strike down its efforts to fight drugs and gun crime, reject plans for Senate reform and even say no to the Prime Minister's choice of a judge for the Supreme Court.

Mr. Khadr had asked to be released while he appeals his U.S. convictions.

Story continues below advertisement

A lower-court judge had granted bail last week, and the government sought a court order suspending that ruling during an appeal, saying bail for Mr. Khadr would cause irreparable harm to this country's relationship with the United States. Mr. Khadr was sent home to Canada in 2012 as part of a plea bargain in which he pleaded guilty to the war crime of murder and other charges in return for an eight-year prison sentence.

But Justice Bielby said the government provided no evidence from the United States that relations would be harmed. She said Mr. Khadr's case is unique, and would not lead to a flood of prisoners seeking early release.

Amnesty International, which probes human-rights abuses around the world, said it welcomed the ruling.

For Mr. Khadr, who had been incarcerated since he was 15, when the United States accused him of throwing a grenade that killed Sergeant Christopher Speer in Afghanistan, freedom will bring huge challenges.

Even being out of chains in Canadian prisons, he told a psychologist three months ago that he felt "weird," after nearly a decade at the U.S. prison for terrorists in Guantanamo Bay, Cuba. The psychologist found what appeared to be astonishing resiliency in Mr. Khadr, who said he is not bitter, believes in people's essential goodness and is opposed to terrorism. But the psychologist also said that the immense stresses of freedom and public attention, including from terrorist sympathizers, could make him susceptible to negative influences.

But Mr. Khadr was more optimistic.

Story continues below advertisement

"Freedom is way better than I thought," he said on Thursday. "The Canadian public has been way better than I anticipated."