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.
In both cases, the killers were Canadians with an alleged history of drug addiction, mental illness and admiration for extremist Islamic terrorists who've been on a brutal rampage in Iraq and Syria.
"These were disgraceful, shocking acts perpetrated, sadly, by self-professed Muslims in the name of Islam," Harper said. "How important it was that the Ahmadiyya Muslim Jammat categorically and unequivocally condemned both the actions themselves and the terrorists who committed those acts."
The prime minister said he understood that Muslim communities are often among those most at risk from attacks by violent extremists and urged their members to continue their efforts against radicalization.
"Together we must unite around our common values — freedom, democracy, human rights and the rule of law," he said.
"When you take your place in the public square and you proclaim love for all, hatred for none, and that however we understand God it is wrong to kill in his name, you are in a most essential way a partner, a neighbour and a friend to all Canadians."
Also on HuffPost