OTTAWA - The Harper government had a bit of trouble Friday figuring out if it's appealing a court ruling on the Omar Khadr case.

In the end, the government said it has not decided whether to appeal the Federal Court order that it ask the United States to send Khadr home from military detention in Guantanamo, Cuba.

Foreign Affairs Minister Lawrence Cannon first told the House of Commons that there would be an appeal. He said Khadr, 22, is facing serious charges and that the American justice process must play out.

But his spokeswoman,Catherine Loubier, quickly contradicted that, saying no decision had been made.

Within minutes, she backtracked, saying the minister's comments stood.

A short time later things changed again, with Loubier saying the government was still considering what to do.

She said the government has 30 days to appeal the ruling and has directed its lawyers to "advise on the option of an appeal."

The opposition parties stepped up their demands that Khadr be brought home and tried in Canada, if necessary, in light of the court decision.

Judge James O'Reilly ruled Thursday that Ottawa's refusal to demand repatriation of Khadr offends fundamental justice.

The charges against Khadr are before an American military commission, but the hearings are on hold pending a review of his case.

Detainees from other western countries, including Britain and Australia were sent home long ago. Khadr is thought to be the last westerner at Guantanamo.

Cannon tried justify the government's bid for an appeal by linking Khadr to the deaths of Canadian soldiers in Afghanistan, including Trooper Karine Blais whose funeral was Friday.

"Last night we were able to see television footage of Mr. Khadr's alleged building and planting of explosive devices that are actually planted in Afghanistan," Cannon told the Commons.

"Those devices are the devices that basically have taken away the lives of young Canadian men and women."

That comment drew a sharp rebuke outside the House from New Democrat Paul Dewar.

"He seems to be using the tragedy of the loss of lives of Canadian soldiers to defend an indefensible position," Dewar said.

"The government is in such a small corner now that what we saw today is a desperate grasping at straws and, quite frankly, I don't think it worked.

"I think it's really sad that the minister tried to use the tragedy of the loss of lives of Canadian soldiers and trying to connect it to Mr. Khadr. It's absolutely wrong."

Liberal Bob Rae was equally critical.

"No one is talking about underestimating the seriousness of the charges against Mr. Khadr," Rae said.

"No one is advocating on behalf of what he is alleged to have done . . . what we are saying is that there is a serious decision of the Federal Court and Mr. Cannon has chosen to change the subject and frame the discussion in a completely different way."

Khadr, who was born in Toronto, was 15 when he was captured by American soldiers in Afghanistan in 2002. He allegedly tossed a grenade that killed a military medic.

The judge ruled that the government must ask the United States "as soon as practicable" to send Khadr home.

Nate Whitling, one of Khadr's Canadian lawyers, acknowledged there is no guarantee the government of U.S. President Barack Obama would agree to a repatriation request. But Canada should still try, he said.

In reaching his decision, O'Reilly accepted arguments from Khadr's lawyers that the government should have sought his repatriation on the grounds that Canada was complicit in his torture.

"Canadian officials were knowingly implicated in the imposition of sleep-deprivation techniques," the judge wrote.

Government lawyers argued Ottawa had nothing to do with any mistreatment.

While Khadr's plight has won him some symphony, his family has been widely criticized and called the "first family of terrorism."

His father was an alleged al-Qaida militant and financier who was killed by Pakistani forces in 2003. A brother, Abdullah Khadr, is being held in Canada on a U.S. extradition warrant, accused of supplying weapons to al-Qaida.

Another brother, Karim, was wounded and left a paraplegic in the gunfight that killed his father. He returned to Canada in 2004 for medical treatment and lives in Toronto.

Dewar said the Khadr family's notoriety isn't an issue.

"It's due process," he said. "It's not a popularity contest.

"Every other country had repatriated their nationals. Bring this kid home and deal with him here."