TORONTO -- It is of "great importance" to hear Canadian Muslims condemn the attacks which killed two soldiers in Montreal and Ottawa this year, Prime Minister Stephen Harper said as he expressed his gratitude for those who spoke out against the events that rattled the country.

The comments -- believed to be Harper's first public words of support for Canadian Muslims following the incidents -- were made as he addressed a gathering of the Ahmadiyya Muslim community in north Toronto on Thursday night.

"Just as you need to hear that your community is embraced by this country, so non-Muslim Canadians also want to hear from their Muslim neighbours that Islam is a force for peace in our country and not something to be feared," Harper said. "You offer them this reassurance."

Harper had been criticized last month by certain Muslim groups for not publicly stating his support for Canadian Muslims in the wake of the attacks. The groups had said their efforts to demonstrate that most Muslims do not share extremist beliefs and to show solidarity with non-Muslim Canadians needed to be reinforced by political leaders.

The attacks took place within days of each other this October, sending shock waves across the country.

Warrant Officer Patrick Vincent died when he and another soldier were run down in Quebec by a man harbouring jihadist sympathies. Two days later, Cpl. Nathan Cirillo was shot dead by a gunman in Ottawa who then went on to open fire in the halls of Parliament before being killed.