ottawa shooting
A wounded Canadian soldier is moved into an ambulance at the scene of a shooting at the National War Memorial in Ottawa AFP

A Canadian solider who was shot by a gunman at Ottawa's War Memorial has died, government officials have confirmed.

Canada's Minister of Employment and Social Development, Jason Kenney, gave his condolences to the family of the serviceman on Twitter.

Kenney's statement was not immediately confirmed by police. CBC news reported that Ottawa Hospital would not give updates on the soldier, choosing to defer to Canada's armed forces.

The soldier was shot at Ottawa's War Memorial, near the Canadian parliament building, by a man reportedly armed with a rifle.

The gunmen then moved to the parliament building itself, where he was shot dead by police.

At least 30 shots were fired inside, according to witnesses and media. A reporter from the Canadian news outlet The Globe and Mail managed to capture the exchange of gunfire inside the Parliament Hill building.

Authorities suspected there were as many as five shooters involved in the attack, with shots also fired near the Rideau Centre Mall in the Canadian capital.

Police warned residents of Ottawa to stay away from windows and roofs as they continue to search for suspects, despite early reports of a gunman being killed inside parliament.

Another two people were taken to hospital with gunshot wounds.