Stephen Harper described the attacker as a terrorist and promised to “redouble” anti-terror efforts.
The gunman, reportedly a Muslim convert named Michael Zehaf-Bibeau, shot and killed a soldier at an Ottawa war memorial before entering parliament.
It came a day after a Muslim convert killed a soldier in Quebec.
Mr Harper described that earlier attack as a plot inspired by the Islamic State (IS) militant group.
Earlier this month, Canada announced plans to join the US-led campaign of air strikes against IS militants in Iraq.
However, there is no official confirmation that any of this week’s attacks are directly linked to IS or the new military campaign.
The shooting suspect
- Named as 32-year-old Michael Zehaf-Bibeau, a petty criminal with a history of convictions for minor drug offences and theft
- Officials believe he recently converted to Islam; a friend he met at a mosque described him as unstable
- His mother is thought to be an immigration official, his father a Libyan who once ran a cafe in Montreal
In a televised address late on Wednesday, Mr Harper said: “We will not be intimidated. Canada will never be intimidated.
“In fact, this will lead us to strengthen our resolve and redouble our efforts… to take all necessary steps to identify and counter threats and keep Canada safe.”
Mr Harper stressed that the perpetrators “will have no safe haven” in Canada, but admitted the attacks showed that the country was “not immune to terrorist attacks”.
Mr Harper has been meeting MPs at the time of the shooting, but was safely evacuated.
The attack began on Wednesday morning, as two soldiers guarding the memorial came under fire from a man carrying a rifle.
One soldier, Cpl Nathan Cirillo, died of his injuries. Three other people were treated in hospital and released by evening.
Minutes after the attack at the memorial, dozens of shots were fired inside the parliament building.
The gunman was shot dead by Sergeant-at-arms Kevin Vickers, 58.
“MPs and [Parliament] Hill staff owe their safety, even lives, to Sergeant at Arms Kevin Vickers who shot attacker just outside the MPs’ caucus rooms,” New Democrat MP Craig Scott tweeted.
Zehaf-Bibeau, 32, had apparently been designated a high-risk traveller and had his passport taken away because of suspected jihadist sympathies.
A Twitter user who posted an image purporting to show Zehaf-Bibeau said it had come from an IS-linked account.
Zehaf-Bibeau had a police record for petty crime, including possession of drugs and robbery.
In his evening address, Mr Harper described him as a terrorist.
“In the days to come we will learn more about the terrorist and any accomplices he may have had,” Mr Harper said.
Parliamentary official who stopped the gunman
- Witnesses identified the parliamentary Sergeant-at-Arms, Kevin Vickers, as the man who shot dead the attacker
- Mr Vickers, 58, took up his role in 2006 after 29 years in the Royal Canadian Mounted Police
- He last made headlines in 2011 when he supported the right of Sikhs to wear ceremonial daggers in the House of Commons
The police sealed off the area around parliament as they hunted for potential accomplices.
Some parliamentary staff, politicians and journalists were forced to remain barricaded inside the building for several hours.
Parliament Hill is still closed to the public, but MPs are expected to return to work at 10:00 (14:00 GMT).
In a telephone conversation with Mr Harper, US President Barack Obama condemned the attacks. (BBC)
Tina Okunmwendia liked this on Facebook.