A man shot dead two people and seriously injured two others in a series of attacks in western Canada.

The man was eventually killed by police, authorities in the southeast Vancouver city of Langley said Monday.

The exact motive of the alleged lone perpetrator was initially unclear.

The authorities were initially unable to confirm media reports that the victims were homeless.

"At this time we are determining exactly who these people were and we are unable to confirm that they are actually homeless," said investigator David Lee.

Police chief Ghalib Bhayani said it was still unclear whether there was a connection between the perpetrators and the victims.

The attacker probably acted alone.

Two of the victims died.

A woman suffered life-threatening injuries and a fourth victim suffered a gunshot wound to the leg.

The shots were fired on Monday morning in the town of Langley, which has a population of 130,000 and is located around 40 kilometers south-east of Vancouver in the province of British Columbia.

The police had initially only spoken of "several victims".

The population was asked to stay away from the crime scenes.