A gunman shot and killed a soldier at a war memorial in Ottawa, then ran into the parliament building where he exchanged gunfire with police.
One gunman is dead, but parts of Canada’s capital remain on lockdown as police hunt for more suspects.
At a press conference, police said the situation was “ongoing” and “fluid”.
It came hours after Canada raised its terror threat level, after another soldier was killed on Monday in a hit-and-run attack by a Muslim convert.
The country earlier this month announced plans to join the US-led campaign of air strikes against Islamic State (IS) militants in Iraq.
But there is no confirmation any of this week’s attacks are linked to IS or the new military campaign.
The latest incident began when soldiers guarding the memorial came under fire on Wednesday morning.
One gunman – said to be carrying a rifle – fired on soldiers guarding Canada’s main war memorial and then ran into the parliament.
“Shots fired at War Memorial at 9:52am today; one person injured,” Ottawa Police tweeted.
A statement by Ottawa Police confirmed the soldier had died from his injuries.
Dozens of shots were fired inside the parliament building, Canadian MP Marc Garneau told the BBC.
Canadian parliamentary waiter Alain Merizier described seeing a dark car stop outside parliament’s centre block and a driver with “a long gun” get out and run inside the entrance of the building, pursued by a parliamentary officer.
He said: “I was astonished more than frightened. You don’t have time to be afraid.”
MP John McKay described the moment the gunman attacked parliament: “There was a pop, pop, pop sound so the guards ushered us to the back of the building.
“How the gunman was able to walk down the hall of honour inside parliament with a rifle will become an area of investigation.”
According to Reuters news agency, Prime Minister Stephen Harper was addressing the cabinet at the time but he was safely evacuated. He later condemned the incident as a “despicable attack”.
Police stormed the building and one gunman was shot dead inside in a heavy exchange of fire.
The Ottawa Hospital said it had taken in three patients, and two of them were in a stable condition. The other was the soldier who died.
Shots were reportedly fired at a nearby shopping centre, but police later said they had no confirmation of activity there.
Police told those in the vicinity of central Ottawa to stay away from windows and roofs as they searched for additional suspects.
The nearby University of Ottawa was placed on lockdown, as well as all local police buildings and the US embassy.
Marc Coucy of the Ottawa Police told the Canadian Broadcasting Corporation that officers were looking for “multiple suspects” in shootings at three locations. But police later would not confirm if there was more than one gunman.
Ottawa Mayor Jim Watson labelled the events a “sad and tragic day for the city and country”.
Earlier on Wednesday, White House spokesman Josh Earnest told reporters US officials have been in “close touch” with their Canadian counterparts.
In a telephone call with Mr Harper, US President Barack Obama condemned the attacks and reaffirmed the two nations’ close friendship.
The elevated terror threat level came in response to an increase in online “general chatter” from radical groups including Islamic State and al-Qaeda, officials said.
Source: BBC News