Updated

Former Guantanamo inmate Omar Khadr appeared in a Canadian court here Monday as his lawyers sought his transfer to a provincial prison.

Smiling broadly and appearing relaxed, Khadr shook his lawyer's hand and took his seat in the Edmonton, Alberta courtroom.

Outside the court, his supporters, wearing orange ribbons, reportedly sang Canada's national anthem and waved placards welcoming him.

Khadr, now 27, was in court seeking to have his detention in an a maximum security adult prison in Edmonton declared illegal as he was 15 at the time of his offences.

His lawyer Dennis Edney has asked for Khadr's transfer out of the prison to a more comfortable provincial jail.

Canada's justice department opposes the move.

As the proceedings got under way, Canadian Prime Minister Stephen Harper said in Ottawa: "This is an individual who as you know pled guilty, was convicted of very serious crimes including murder and it is very important that we continue to vigorously defend against any attempts in court to lessen his punishment for these heinous acts."

Khadr was repatriated to Canada in September 2012 after spending 10 years in the US military prison in Guantanamo Bay, Cuba following his arrest in Afghanistan as a teenager in 2002.

He was sentenced to eight years in 2010 following a military hearing in which he agreed to plead guilty to murder in violation of the law of war, attempted murder, conspiracy, providing material support for terrorism and spying.

The murder charge related to a grenade attack that killed a US soldier.