When RCMP Sgt. Derek McDonald walked into the downtown Toronto mosque, he was friendly and warm, smiling and shaking hands enthusiastically.

It’s a style he’s deployed more than 50 times in similar visits across Canada.

See Ioanna Remouliotis's full report on the RCMP's Muslim outreach program on The National tonight at 9 p.m. on CBC News Network and 10 p.m. on CBC Television.

But as open and warm as he appeared that night at the Toronto Islamic Centre mosque, he also had a very serious goal behind his actions: fostering community ties with Muslims that may one day help the national police force thwart a terror attack.

"If something comes up that is a police matter, they’re going to go to the imam and say 'Who's that RCMP guy that came to talk last year?’ It will come back, I know it," McDonald told CBC's Ioanna Roumeliotis.

McDonald’s efforts are part of the RCMP’s Muslim Outreach program, an initiative it quietly launched two years ago in a bid to encourage dialogue that could act as an early warning system for terror plots.

“This is not a public relations tool,” said Supt. Doug Best, who heads the RCMP’s national security operations in Ontario. “These types of investigations, we’ll probably get only one chance and if we miss it, the results can be catastrophic.”

The changing nature of terror threats makes community support even more critical, police say. Best points to the April 2013 plot to derail a Via passenger train in the Toronto-Niagara corridor as an example of the small, decentralized threats facing Canada today.

There has not been a large-scale attack in North America that rivals what unfolded in September 2001. Instead, smaller events like the 2013 Boston marathon bombing have dominated recently headlines. In that case, the attack was carried out by a two-man team.

Virtual sources

Best points to virtual sources like Inspire, an online magazine reportedly published by al-Qaeda, as one of the places would-be attackers could look for ideas that can be executed with little funding or sophistication.

Doug Best

RCMP Supt. Doug Best says the Muslim outreach program is 'not a public relations tool.' (CBC)

Best described some of those ideas as “chilling,” including the “idea of having a vehicle, with blades attached to hubs and [driven] into a crowd of people so you can maim or injure as many people as possible.”

At the mosque, McDonald insisted to the crowd that the RCMP are opening up a dialogue and not profiling the Muslim community. “We’re not here tonight to recruit informants or spy on people,” he said. “There are no strong-arm tactics.”

However, some Muslims in attendance worried this is a form of profiling.

“We’re definitely concerned about the security,” said Hosam Helal, a mosque leader. But “a lot of Muslims will also be concerned that sometimes security figures will exaggerate threats.”

Within the Muslim community, there’s also a fear of being ostracized. Even today, months after the plot was revealed, the imam who reported the Via rail threat remains anonymous.

'Snitches end up in ditches'

That was not the case for Mubin Shaikh. He was recruited by CSIS, the Canadian spy agency, to infiltrate the so-called Toronto 18, a group of al-Qaeda inspired youths who planned to blow up high-profile Canadian landmarks including the CN Tower.

Mubin Shaikh

Mubin Shaikh was recruited by CSIS to infiltrate the so-called Toronto 18, a group of al-Qaeda-inspired youths who planned to blow up high-profile Canadian targets. (CBC)

Shaikh said that some Muslims felt he’d turned on his own community.

“Traitor, spy. Snitches end up in ditches,” Shaikh said, describing the responses he heard.

Both the RCMP and members of the community agree that the best chance for dialogue may lie with the younger generation of Muslim Canadians. With that in mind, the RCMP’s program is targeting schools.

“That’s really the messaging we give to the communities,” said Best. “They have responsibilities as citizens no different than I have as a citizen to ensure the safety of our communities.”

With files from Ioanna Roumeliotis