Harper tweeted: "Today, our thoughts & prayers are with the family & friends of Corporal Nathan Cirillo of the Argyll and Sutherland Highlanders of Canada."
"Let there be no misunderstanding, we will not be intimidated. Canada will never be intimidated," he said.
The PM said: "I have every confidence that Canadians will pull together with the solidarity that has seen our country through many challenges."
Canadian parliament came under attack along with the national capital's war memorial on Wednesday morning, forcing a lockdown of the house after a gunman entered the building when the Prime Minister was inside while shots rang outside, leaving a soldier and a suspected terrorist dead.
Reports said firing occurred outside the room where Prime Minister Stephen Harper was addressing legislators. Harper was, however, taken away from the scene safely.
The Ottawa Police have said the area, where the attack took place on Wednesday, is not facing a threat to public safety anymore.
In a statement, the police said: "The safety perimeter in Downtown Ottawa has now been lifted. The ongoing police investigation in the downtown core has determined that there no longer exists a threat to public safety in the area.However, the police operation continues on Parliament Hill and as such the Hill continues to be off limits to the public."
"The RCMP has taken carriage of the ongoing investigation as it falls within their national security mandate. Ottawa Police will continue to support the investigation. The Ottawa Police and RCMP would like to thank the public for their cooperation in this ongoing investigation. Residents will continue to see an increased police presence in key areas in the coming days," it said.
Such an incident was unprecedented in Canada as the MPs created a wall of defence and barricaded themselves into a parliamentary caucus room but putting furniture against the doors.
The police earlier said one gunman has been killed while a member of the Canadian Forces also died during the attack.