A government source has confirmed to CBC News that Ottawa will apologize and pay millions of dollars in compensation to former Guantanamo Bay prisoner Omar Khadr.

Khadr — who confessed to killing a U.S. army medic when he was 15, under interrogation that was later deemed "oppressive" — will receive a settlement of $10.5 million, the source, speaking on condition of anonymity, confirmed to CBC late Tuesday.

Details of the deal were first reported earlier Tuesday by unnamed sources who spoke to The Associated Press, the Toronto Star and the Globe and Mail.

Khadr, who now lives in an apartment in Edmonton, had been seeking $20 million in a wrongful imprisonment civil suit against Ottawa.

Prime Minister Justin Trudeau, at a news conference at Farmleigh House in Dublin on Tuesday, was asked about Khadr's case and said: 'We are anticipating, like I think a number of people are, that that judicial process is coming to its conclusion.' (Niall Carson/PA via Associated Press)

The government and Khadr's lawyers negotiated the deal last month, according to The Associated Press.

Speaking to reporters in Ireland, Prime Minister Justin Trudeau would not confirm any details.

"There is a judicial process underway that has been underway for a number of years now, and we are anticipating, like I think a number of people are, that that judicial process is coming to its conclusion," Trudeau said.

15 at time of arrest

Born in Toronto, Khadr was 15 in July 2002 when he was captured by U.S. troops following a firefight at a suspected al-Qaeda compound in Afghanistan that resulted in the death of Sgt. Christopher Speer.

Khadr was suspected of throwing the grenade that killed Speer and confessed to doing so during later interrogations by military and FBI investigators.

The Canadian was taken first to prison at the Bagram U.S. military base in Afghanistan and then to the prison at the Guantanamo Bay U.S. naval base in Cuba and ultimately charged with war crimes by a military commission.

After pleading not guilty to five war crimes charges, including murder, in 2010, he changed his plea to guilty later that year 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 war crime convictions, in which he argued that his admissions of guilt were made under duress.

Khadr spent 10 years in the U.S. military prison at Guantanamo Bay, Cuba. He initially pleaded not guilty to the war crimes charges against him, then changed his plea to guilty and in 2015 launched an appeal of his convictions. His case received international attention, with some advocating that he should be treated with more leniency because he was a child soldier. (Brennan Linsley/Associated Press)

Khadr spent 10 years in Guantanamo Bay. His case received international attention, with some advocating that he should be treated as a child soldier, not an adult.

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 U.S. officials.

Youngest detainee at Guantanamo

Khadr, now 30, was the youngest and last Western detainee at the U.S. military prison.

His lawyers filed a $20-million lawsuit against Ottawa, arguing the government violated international law by not protecting its own citizen and conspired with the U.S. in the wrongful imprisonment and abuse of Khadr. The suit was first filed in 2004 and expanded in 2014.

The widow of Speer and another U.S. soldier blinded by the grenade in Afghanistan filed a wrongful death and injury lawsuit against Khadr in 2014, fearing Khadr might get his hands on money from his wrongful imprisonment lawsuit.

A U.S. judge granted $134.2 million in damages in 2015, but the plaintiffs acknowledged then that there was little chance they would collect any of the money from Khadr because he lives in Canada.

Khadr's lawyers have long said he was pushed into war by his father, Ahmed Said Khadr, whose family stayed with Osama bin Laden briefly when Omar Khadr was a boy.

Khadr's Egyptian-born father was killed in 2003 when a Pakistani military helicopter shelled the house where he was staying with senior al-Qaeda operatives.

After his 2015 release from prison in Alberta, Omar Khadr apologized to the families of the victims. He said he rejects violent jihad and wants a fresh start to finish his education and work in health care.

Human rights groups applaud reports

Human rights groups welcomed the reports.

"For 15 years, Omar Khadr's case has been a stark reminder of the many ways that an overreaching and unchecked approach to national security readily runs roughshod over universally protected human rights," said Alex Neve, secretary general of Amnesty International Canada.

Neve said Khadr's rights were violated or ignored in Afghanistan, at Guantanamo Bay and in Canadian prisons, and that U.S. interrogators, jailers and officials refused to recognize him as a child soldier.

The previous Conservative government offered "inflammatory rhetoric" instead of making an effort to help him, Neve said.

University of Toronto Law Professor Audrey Macklin: The government was involved in both direct violations of Omar Khadr’s Canadian Charter rights and they were complicit in violations of Khadr’s rights by the U.S. 6:25

Last month, the NDP wrote a letter to Justice Minister Jody Wilson-Raybould urging her to act on an e-petition that said Canada abandoned Khadr to a decade of torture and abuse.

"We recognized that his fundamental rights had been deprived as has been explained by the Supreme Court of Canada and this was really about the treatment he received while he was incarcerated," the NDP justice critic Alistair MacGregor told CBC.

"It's fortuitous and maybe a nice coincidence these reports have come out now after we sent that letter."

The e-petition, which opened March 22 and closes July 20, had more than 2,470 signatures as of Tuesday afternoon.

An apology does not absolve Canada for its many years of inaction. - Roméo Dallaire, retired lieutenant-general, Canadian Forces

Retired lieutenant-general Roméo Dallaire, founder of the Child Soldiers Initiative, said the apology and compensation is a first step in a long healing process.

"An apology does not absolve Canada for its many years of inaction, but does give it an opportunity to finally lead once again on issues of children," he said in a statement.

The National Council of Canadian Muslims said it would welcome a "long overdue" apology and compensation.

"It is the right decision in light of the callous and unlawful treatment meted out to Mr. Khadr with the complicity of Canadian officials," NCCM executive director Ihsaan Gardee said in a news release.

Federal Conservatives are critical

Others condemned the reported deal, including the federal Conservatives.

Public safety critic Tony Clement rejected the argument that Khadr was a child soldier because he "admitted his guilt." Clement called it "completely inappropriate" that the government would strike a deal to compensate and apologize to Khadr, forcing the Speer family to relive the ordeal.

We're absolutely astounded this has happened, that he is now one of the richest Canadians in the country because of this settlement. - Tony Clement, Conservative public safety critic

"We're absolutely astounded this has happened, that he is now one of the richest Canadians in the country because of this settlement," he told CBC News. "We feel this is an act that betrays those innocent Canadians who were killed on 9/11, 25 of them, and also our soldiers who were working so hard in Afghanistan at the time."

He said any financial compensation should be given to Speer's widow and two children.

Alberta Progressive Conservative Leader Jason Kenney also denounced the reported deal.

"Odious. Confessed terrorist who assembled and planted the same kind of IEDs that killed 97 Canadians to be given $10 million by Justin Trudeau," the former federal immigration minister under Stephen Harper tweeted.