Prime Minister Justin Trudeau says the Charter of Rights and Freedoms protects all Canadians "even when it is uncomfortable," responding to a question about his government's apology and controversial payout to former Guantanamo Bay prisoner Omar Khadr.

"The Charter of Rights and Freedoms protects all Canadians, every one of us, even when it is uncomfortable. This is not about the details or merits of the Khadr case. When the government violates any Canadian's Charter rights we all end up paying for it," he told reporters in Hamburg, where he's wrapping up the G20 summit.

Khadr — who has been branded a terrorist by some and a child soldier subjected to torture by others — received a $10.5-million cheque Wednesday, sources told CBC News

Trudeau has been travelling all week with stops in Ireland and Scotland, before flying to Germany for the global leaders' summit. Meanwhile, the Khadr payout has dominated headlines back home.

Former Guantanamo Bay prisoner Omar Khadr, 30, is seen in Mississauga, Ont., on Thursday, July 6, 2017. The federal government has paid Khadr $10.5 million and apologized to him for violating his rights during his long ordeal after capture by American forces in Afghanistan in July 2002. (Colin Perkel/Canadian Press)

News of the settlement first leaked late Monday night, but it took until Friday for the government to officially confirm that a settlement had been reached — and Ottawa refused to disclose the amount.

"It is not about previous behaviour on the battlefield in Afghanistan; it is about the acts and other decisions the Canadian government took against Mr. Khadr after he was captured and detained," Public Safety Minister Ralph Goodale said Friday. "Those facts are not in dispute and there is no doubt about how the Supreme Court views them. The government of Canada offended the most basic standards."

Conservative Leader Andrew Scheer said it was "disgusting" for the government to concoct a "secret deal" and hand over millions to a convicted terrorist.

"This payout is a slap in the face to men and women in uniform who face incredible danger every day to keep us safe," he said Friday.

Scheer said he believes the Harper government's decision to repatriate Khadr in 2012 was a sufficient response to the Supreme Court's ruling that Khadr's rights were violated.

'Restores a little bit my reputation'

In an interview with CBC News' Rosemary Barton, the Canadian-born Khadr, 30, said he hopes the settlement will help restore his reputation.

"I think it restores a little bit my reputation here in Canada, and I think that's the biggest thing for me," he said.

Khadr was 15 when he was captured by U.S. troops following the confrontation at a suspected al-Qaeda compound in Afghanistan in 2002.

Suspected of throwing the grenade that killed U.S. Sgt. Christopher Speer, he was taken to Guantanamo and ultimately charged with war crimes by a military commission.

In 2010, he pleaded guilty 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.