ottawa shooting
Armed RCMP officers approach Parliament Hilll in Ottawa, where a soldier was shot deadReuters

The Canadian authorities were aware of "potential Isis [Islamic State]-inspired knife and gun attacks" long before a Canadian soldier was killed by a gunman in Ottawa today (22 October).

Within minutes of the gun attack at Ottawa's War Memorial, speculation that Islamic State militants were involved in the shooting was rife.

Long before the attack took place, Canadian intelligence experts were assessing the possibility of a terrorist assault. Indeed a report by NBC News, published in early October, said that the country's top officials were investigating at least 90 people suspected of being involved in terrorism activities.

''Intelligence officials tell NBC News that Canadian authorities have heard would-be terrorists discussing potential Isis-inspired 'knife and gun' attacks against US and Canadian targets inside Canada,'' the network reported.

''Both US and Canadian officials fear the beheading of an innocent person in a public place, or the slashing of citizens on a crowded street until police arrive to shoot and 'martyr' the terrorists.

''Canadian officials are weighing increased security around public buildings in coming days, government officials there say.''

The Ottawa gunman was shot dead inside the Canadian parliament building, a few hours after he had killed the soldier. Police reported that there may be other shooters on the loose, according to local reports.

James Watson, the current mayor of Ottawa, released a public statement following the incident, saying: "I am shocked and saddened by what has happened in the last hour in the nation's capital.

"Residents will be kept informed as events unfold."

Following the shooting, a Twitter user who identified himself as a supporter of IS wrote: "Our soldiers are on the ground in every theater, will battle you everywhere."

However, the validity of the message has not yet been verified, as the tweet was translated from Arabic into English by a non-Arabic speaker.

The Ottawa attack came just one day after a 25-year-old man suspected of being an Islamist extremist was shot dead by police after he killed a Canadian solider and injured a second near Montreal.

Canadaraised its national terror threat levelfrom low to medium following the attack.