An 18-year-old has been named as the suspect in a shooting that killed eight people and injured dozens more in British Columbia, Canada.

Police said Jesse Van Rootselaar was found dead at the scene from a self-inflicted gunshot injury. The motive for the attack is not yet known.

Six people were killed and at least 25 others were injured at Tumbler Ridge Secondary School. Two others - the suspect's mother, 39, and step-brother, 11 - were found dead at a nearby home.

Authorities said Van Rootselaar was born a biological male but identified as a woman.

I can say that Jesse was born as a biological male who approximately six years ago began to transition to female, Dwayne McDonald, the Royal Canadian Mounted Police (RCMP) deputy commissioner, said. The shooting at the nearby home occurred first, then the suspect went to the school, McDonald said.

The victims at the school included a 39-year-old educator and five students aged between 12 and 13. Authorities have indicated they do not believe there are other suspects involved.

Police records show that the Van Rootselaar family home had previously been visited by authorities due to mental health concerns, and it was noted that Van Rootselaar's gun license had lapsed.

Canadian Prime Minister Mark Carney expressed condolences, stating that students and teachers at the school experienced unheard of cruelty, while Tumbler Ridge Mayor Darryl Krakowka highlighted the tight-knit community's sense of loss, saying he knows each victim personally.