A self-confessed Muslim fundamentalist has told the BBC about his police informant role in helping to stop an alleged terrorist attack.
Canadian Mubin Shaikh befriended men who were allegedly plotting truck bombs in the downtown area of Toronto.
It is also claimed they discussed storming the parliament in revenge for Canada's military role in Afghanistan.
Mr Shaikh's work was a breakthrough for western security services attempting to penetrate terrorist networks.
Mr Shaikh told BBC Two's Newsnight programme that he first approached the Canadian Intelligence Service (CSIS) when a childhood friend was arrested in relation to a major British plot.
Momin Khawaja, also Canadian, is now awaiting trial for allegedly offering to supply detonators to a British conspiracy to build a massive fertiliser bomb. Five men were jailed in relation to that plot earlier this year.
In his interview, Mr Shaikh tells the BBC how CSIS was interested in "the standing I had in the community and the connections I had" and asked him if he would work with them.
Training: Mr Shaikh's fighting skills interested the men
He agreed and was tasked with befriending a group that spies had been monitoring in extremist internet chatrooms.
In one chatroom, a London-based extremist calling himself Abu Dujanah tells one of the Toronto group that al-Qaeda is a "transnational university that specialises in the science of jihad and the production of mujahideen."
Abu Dujanah was a name used by Tariq Al Daour, a UK resident.
He was recently convicted in an unrelated British counter-terrorism case of incitement to murder over the internet.
Mr Shaikh was an army cadet as a teenager and soon joined the men he was targeting in a 10-day training camp in woodland north of the city.
Mr Shaikh says he taught the men mock combat exercises and target practice.
He denies that he egged them on and told the BBC the men spelled out their audacious plans in conversations in a car which had been bugged by CSIS.
When some of the group allegedly tried to buy three tonnes of ammonium nitrate, police moved to arrest 17 men and youths.
Momin Khawaja: Knew Shaikh - and named in British plot
Though charges have been stayed against three of them, the trial will be the biggest terrorism case in Canadian legal history. Central to the Crown's case will be the credibility of Mr Shaikh and another informant used in the case.
But Mr Shaikh, who has an outstanding assault charge against him which he denies, has also been criticised by some within the Muslim community for receiving $300,000 (£150,000) for his work.
Muhammad Robert Heft, who runs P4E, a Toronto charity for Muslim converts, said: "I personally believe that Mubin Sheikh had good intentions and I personally believe he was trying to keep Canada safe.
"Had he really thought about it, and realised that the Muslim community is so sceptical of the intentions of people out there, he would have reconsidered and not taken the money in order to keep the Muslim community on his side."
Mike McDonnell: Deployed organised crime tactics
But Mr Shaikh told the BBC he could have earned a great deal more and didn't do it for the money.
The Canadian police have defended their use of informants in cases such as this.
Mike McDonell, Assistant Commissioner of the Royal Canadian Mounted Police, said: "If you are introducing someone into a select group of individuals within a small community it is challenging.
"It doesn't matter if we get into organised crime and motorcycle gangs - they have certain tests that they try and get the individuals to perform to ensure they are not police officers or agents.
"The only difference is that you take power and greed out, replace it with ideology and you take the commodity out of say - clandestine drug labs - and replace it with bomb making labs and it's just like old times with organised crime."
Mubin Shaikh meanwhile has no doubts he did the right thing: "I was born and raised in Toronto," he said. "How could I let anything happen here?"