TORONTO (REUTERS) - Canadian police are investigating a man named Michael Zehaf-Bibeau as a possible suspect in the shootings around parliament, a source familiar with the matter said on Wednesday.
Two US officials said that US agencies have been advised that the shooter was a Canadian convert to Islam. One of the officials said that the man was from Quebec.
Canada's capital was jolted on Wednesday by the fatal shooting of a soldier and an attack on the parliament building in which gunshots were fired outside a room where Prime Minister Stephen Harper was speaking.
The gunman in the parliament building was shot dead, and Mr Harper was safely removed.
Canadian police said they could not "at this point" confirm whether the man who shot dead the soldier, who was guarding the National War Memorial in central Ottawa, was the same person who shortly afterwards attacked the nearby the parliament building.
Witnesses said at least 30 shots were fired after a gunman entered the parliament building and was pursued by police.
The assault came very near the room where Harper was meeting with members of his Conservative party, a government minister said.
"PM (Harper) was addressing caucus, then a huge boom, followed by rat-a-tat shots. We all scattered. It was clearly right outside our caucus door," Treasury Board Minister Tony Clement told Reuters.
The incident, shocking in Canada's normally tranquil capital, was not over.
Parliament and buildings in downtown remained on lockdown.
Mr Harper stressed that government and parliament should continue its work, a spokesman said.
"While the prime minister stated that facts are still being gathered, he condemned this despicable attack," the spokesman said.
Police said that an operation was under way to make parliament safe and they were still in the middle of an active investigation.
"It caught us by surprise... If we had known that this was coming, we would have been able to disrupt it," Mr Gilles Michaud, assistant commissioner of the Royal Canadian Mounted Police, (RCMP) told a news conference.
Dramatic video footage posted by the Globe and Mail newspaper showed police with guns drawn inside the main parliament building.
At least a dozen loud bangs can be heard on the clip, echoing through the hallway. Veterans Affairs Minister Julian Fantino, a former policeman, told the Toronto Sun that parliament's head of security, Sergeant-at-Arms Kevin Vickers, shot dead a suspected gunman.
"All the details are not in, but the sergeant-at-arms, a former Mountie, is the one that engaged the gunman, or one of them at least, and stopped this," Mr Fantino said.
Canadian cabinet minister Jason Kenney said a guard in parliament buildings was also wounded in the incident.
It is unclear whether the attack has any connection to an attack on Monday when an Islamic convert ran down two Canadian soldiers with his car, killing one, near Montreal, before being shot dead by police in the first fatal attack on Canadian soil tied to Islamic militants.
Canada announced this month it was joining the battle against Islamic State fighters who have taken over parts of Iraq and Syria.
Canada said on Tuesday it had raised the national terrorism threat level to medium from low because of a rise in "general chatter" from radical groups such as Islamic State and al Qaeda but said there had not been a specific threat.
The RCMP's Mr Michaud said the threat level on Parliament Hill had been on medium for some time. No group, Islamic or otherwise, claimed responsibility for either the attack in Ottawa or the one near Montreal.
Monday's attacker, 25-year-old Martin Rouleau, who converted to Islam last year, was among 90 people being tracked by the RCMP on suspicion of taking part in militant activities abroad or planning to do so.
In Washington, a White House official said US President Barack Obama had been briefed on the situation. He said the United States had offered assistance to Canada.
Mass shootings are relatively rare in Canada, which has stricter gun laws than the United States, and the regulations at one point included a national registry of rifles and shotguns. Legislation was passed in 2012 to scrap the registry.
Ottawa has a low murder rate. There were nine homicides in 2013 and seven in 2012, in a city of 885,000 people.
Compared with Capitol Hill in Washington, security on Parliament Hill is also fairly low key. Anybody could walk right up to the front door of parliament's Centre Block with arms and explosives without being challenged before entering the front door, where a few guards check accreditation.
Centre Block is the main building on Parliament Hill, a sprawling complex of buildings and open space in downtown Ottawa. It contains the House of Commons and Senate chambers as well as the offices of some members of parliament, senators, and senior administration for both legislative houses.