Canadian Prime Minister Stephen Harper is vowing Canada will not be intimidated by attacks on its soil.
Canadian capital Ottawa was thrown into turmoil this morning by a shootout at parliament.
A gunman shot dead a soldier guarding a nearby war memorial, hijacked a car, crashed it into the parliament building and ran into the building firing a weapon, the BBC reported.
The man - now known to be Canadian citizen Michael Zehaf-Bibeau - was eventually shot dead.
Some MPs and staffers barricaded the doors of their caucus rooms with chairs and tables and lay down on the floor when the shooting started. Others, such as MP John McKay, were hustled down corridors and away from the gunman by security guards.
Mr McKay told Checkpoint the attack had exposed potential weaknesses in security.
He was just heading into the Liberal Party caucus when he was ordered out of the building by security guards and took cover with a group behind a monument.
He said the situation could have been much worse as the gunman was apparently able to move freely through the building.
"He went from the Peace Tower, which is literally at the front of the building, to the front door of the library of parliament, which is at the back of the building, carrying a rifle - between the caucuses of the two main parties."
Mr McKay said the Canadian Parliament had always prided itself on its accessibility, and he hoped today's tragedy did not change that.
It was still not known whether Zehaf-Bibeau was acting alone but police said he was already considered a high-risk suspect before the rampage.
The incident came hours after Canada raised its terror threat level following a fatal hit-and-run attack on two soldiers earlier this week.
In a brief address to the nation, Mr Harper said the incidents were a grim reminder that Canada was not immune to terror attacks. However, security agencies would do everything to counter threats to the country, he said.
Ottawa police chief Charles Bordeleau said police were providing extra security to members of the armed forces, who went door-to-door in central Ottawa looking for further suspects.
"Additional resources are on standby should they be required and all measures have been taken to ensure the safety and security of our residents.
"We are very aware of the large presence of military personal in our community and want them to know that we are committed to their safety."
Police told those in the vicinity to stay away from windows and roofs as they searched for additional suspects.
Parts of the city were put into lockdown following the incident.
At a press conference, Ottawa police said the situation was "ongoing" and "fluid".
The dead soldier was identified in Canadian media as Corporal Nathan Cirillo.
Shots fired
The incident began when soldiers guarding the memorial came under fire.
"Shots fired at War Memorial at 9.52am today; one person injured," Ottawa Police tweeted.
Minutes later, dozens of shots were fired inside the parliament building, Canadian MP Marc Garneau told the BBC.
Police stormed the building and the gunman was shot dead in a heavy exchange of fire.
It had not been confirmed that he was the one who shot the soldier at the memorial.
Multiple members of parliament credited Sergeant-at-arms Kevin Vickers, 58, with shooting the assailant dead.
"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.
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.
"The indications are there is more than one gunman. There may be several," Canadian MP Marc Garneau told the BBC, adding he and fellow politicians were evacuated from the area.
A government official earlier said the raised threat level was in response to an increase in online "general chatter" from radical groups including Islamic State (IS) and al Qaeda.
Ministry spokesman Jean-Christophe de Le Rue said on Tuesday that the increased level "means that intelligence has indicated that an individual or group within Canada or abroad has the intent and capability to commit an act of terrorism".
A minister said it was a "terrible act of violence against our country".
Earlier this month, Canada announced plans to join the US-led campaign of air strikes against IS militants in Iraq.
John Key expresses sympathy
Prime Minister John Key expressed his sympathy to those affected by this morning's events.
While the reason for the fatal shooting was not yet known, it was clearly a senseless act of violence, Mr Key said.
He said New Zealand's sincere condolences went out to the people of Canada, and he would personally extend those thoughts and wishes to the Canadian prime minister.
Mr Key said the shooting would not change New Zealand's current national threat level, which was low, but he would not be surprised if the Parliamentary precinct reviewed its security and changes were made during the next few days to ensure safety.
The Green Party also expressed its solidarity with Canadians and the Canadian parliament, and was offering its sympathy for family and friends of the soldier killed in the attack.
The New Zealand High Commission in Ottawa was put into in lockdown but everyone there was accounted for and safe.
A Ministry of Foreign Affairs and Trade spokesperson confirmed that access to the building had been restricted at the direction of local police authorities.
She said all the High Commission's staff and their families were accounted for and there were no indications that any New Zealanders had been caught up in the terror attacks.
The Canadian High Commission in Wellington also said it was business as usual for them.