HAMBURG — Prime Minister Justin Trudeau says an apology and reported $10.5 million compensation payment to former Guantanamo Bay inmate Omar Khadr was a basic matter of following Canada’s Charter of Rights and Freedoms.

Trudeau answered a question about the settlement to the convicted terrorist on Saturday at the closing press conference following the G20 leaders’ summit in Hamburg, Germany.

On Friday, the government confirmed a payment had been made to Khadr to settle a longstanding lawsuit. Khadr’s suit claimed Canada had violated his rights and was complicit with the United States when he was detained at the U.S. base in Cuba, denied access to a lawyer and tortured.

Regarding a settlement with Omar Khadr - the Charter of Rights and Freedoms protects all Canadians. There is no picking and choosing. pic.twitter.com/UNv6E5qGUp — Justin Trudeau (@JustinTrudeau) July 8, 2017

The Supreme Court of Canada in 2010 ruled Khadr’s rights had been violated.

The apology sparked fresh public debate about Khadr, but Trudeau says the settlement is not about the details of Khadr’s case but the fact his rights were violated.

Trudeau says the Charter of Rights and Freedoms protects all Canadians, “even when it is uncomfortable.”

“When the government violates any Canadian’s Charter rights, we all end up paying for it,” he said.