The federal government has formally apologized to former Guantanamo Bay inmate Omar Khadr and the Conservative Party's new leader says Khadr's $10.5M settlement sends a terrible message to allies around the world.

Khadr was just 15 when he was accused of throwing a grenade that killed United States Sgt. 1st Class Christopher Speer during an American attack on a compound in Afghanistan.

The teen was badly wounded and taken prisoner and then transferred to Guantanamo Bay in October 2002.

Khadr alleges that he was threatened with rape and violence by interrogators who were seeking a confession.

In 2005, a federal court judge ruled that Canadian agencies violated Khadr’s rights by divulging information from interviews to US investigators.

Khadr was charged later that year by the U.S. military with conspiracy, attempted murder and aiding the enemy and he pleaded guilty to five war crimes in 2010.

He was transferred back to Canada to serve the rest of his sentence and was granted bail by an Alberta judge in 2015.

Earlier this week the federal government agreed to pay Khadr $10.5M to settle a long-standing lawsuit over violation of his rights.

On Friday, the Trudeau government formally apologized for any role Canadian officials may have played in Khadr’s mistreatment while he was in US custody.

Conservative Party Leader, Andrew Scheer, was in Calgary on Friday for the parade and held a press conference just before noon to talk about the payout.

“Justin Trudeau should never have agreed to a secret deal that gave a convicted terrorist millions of dollars. Seeking money from the Canadian taxpayer is just a sign of continuing contempt for the country that Khadr has fought against,” said Scheer.

Scheer says that the money should go to the family of the soldier that he allegedly killed.

“If Omar Khadr is truly sorry for what he’s done, that money would be given directly to the family of Sgt. Speer,” he said.

He says the story should have ended with the conservative’s repatriation of Khadr and that the Trudeau government ‘went above and beyond.’

Scheer said the decision is a slap in the face to the men and women in uniform and that it sends a terrible message to the allies of the world.

The U.S. soldier’s widow has filed an emergency injunction to stop the Canadian government from giving Khadr the money.

(With files from Kamil Karamali, ctvnews.ca and The Canadian Press)