The Canadian government is reportedly going to apologise and give compensation to Omar Khadr, a former Guantanamo Bay prisoner.

Khadr, 30, pleaded guilty in 2010 to killing a US soldier in Afghanistan when he was 15, but Canada's Supreme Court later ruled that officials had interrogated him under "oppressive circumstances" such as sleep deprivation.

An official familiar with the deal told the Associated Press news agency on Tuesday that Toronto-born Khadr will receive $8m.

The official was not authorised to discuss the deal publicly before the announcement and spoke on condition of anonymity.

The Toronto Star also reported that the deal was reached in June between Canada's justice ministry and Khadr's lawyer.

WATCH: WITNESS - Guantanamo's Child, Omar Khadr

Omar Khadr spent 10 years in Guantanamo Bay. His case received international attention after some dubbed him a child soldier.

Khadr was 15 when he was captured by US troops following a gun battle at a suspected al-Qaeda compound in Afghanistan that resulted in the death of an American special forces medic, US Army Sergeant First Class Christopher Speer.

Khadr, who was suspected of throwing the grenade that killed Speer, was taken to Guantanamo and ultimately charged with war crimes by a military commission.

He pleaded guilty in 2010 to charges that included murder and was sentenced to eight years plus the time he had already spent in custody.

He returned to Canada two years later to serve the remainder of his sentence and was released in May 2015 pending an appeal of his guilty plea, which he said was made under duress.

The Supreme Court of Canada ruled in 2010 that Canadian intelligence officials obtained evidence from Khadr under "oppressive circumstances", such as sleep deprivation, during interrogations at Guantanamo Bay in 2003, and then shared that evidence with US officials.

A spokesman for Canada's justice ministry and the prime minister's office did not immediately respond to requests for comment.

After his 2015 release from prison in Alberta, Khadr apologised to the families of the victims. He had said he rejects violence and wants a fresh start to finish his education.

He currently resides in an apartment in Edmonton, Alberta and is studying to be a nurse.

Al Jazeera's Daniel Lak, reporting from Toronto, said the apology and compensation could put an end to Khadr's "15-year legal saga".

"He can now look to his home country saying, 'We are sorry, we were wrong, we should have heeded the advice of court after court in Canada that he is a child soldier,'" Lak said.

"I think it is a very big day for supporters of Omar Khadr."