Investigators have yet to offer a motive for one of the worst mass slaughters in Canadian history.
The killer, who police identified as Jesse Van Rootselaar, died by suicide after the shooting on Tuesday, local time, in Tumbler Ridge, a remote community of 2400 people in the Pacific province of British Columbia.
Police revised the death toll down to nine, including Van Rootselaar, from the initially reported 10.
On more than one occasion, Van Rootselaar had been apprehended under the provincial Mental Health Act for an assessment, said Deputy Commissioner Dwayne McDonald, commander of the Royal Canadian Mounted Police in British Columbia.
She once attended the school but dropped out four years ago.
"Police had attended that (family) residence on multiple occasions over the past several years, dealing with concerns of mental health with respect to our suspect," McDonald said.
"We will get through this. We will learn from this," a visibly upset Prime Minister Mark Carney told reporters.
Carney, who at one point looked close to tears, postponed a trip to Europe and ordered flags on all government buildings be flown at half-mast for the next seven days.
Hours later, legislators in the House of Commons observed a moment of silence and listened as a sombre Carney said the killings had left the country in shock and mourning.
"It is a town of miners, teachers, construction workers - families who have built their lives there, people who have always shown up for each other there ... Tumbler Ridge represents the very best of Canada," he said.
McDonald said Van Rootselaar, who was born male but began identifying as a female six years ago, had first killed her mother, 39, and 11-year-old stepbrother at the family home.
She then went to the school, where she shot a 39-year-old woman teacher as well as three 12-year-old female students and two male students, one aged 12 and one aged 13. Police recovered a long gun and a modified handgun.
Dozens were injured, and two severely wounded victims, ages 12 and 19, remain in the hospital.
Police officers who arrived at the scene two minutes after the initial call encountered active gunfire, including rounds fired in their direction, according to authorities, before discovering Van Rootselaar dead from an apparent self-inflicted wound.
"We do believe the suspect acted alone ... it would be too early to speculate on motive," McDonald told a press conference, saying police did not have information to suggest that anyone had been specifically targeted.
Several prominent world leaders sent messages of condolence. King Charles, Canada's head of state, said he was "profoundly shocked and saddened" by the deaths.
Details about some of the victims were slowly emerging.
In an anguished Facebook post, Abel Mwansa said his 12-year-old son, also named Abel, had died in the shooting. Abel had once cried when his father proposed home schooling because he loved going to school so much, his father wrote.
He raised his son, Mwansa added, to respect his elders, "be strong, work hard, put a smile on the face like I do, focus on his studies, never miss school and to be a good kid".
Another woman, Shanon Dycke, said her 12-year-old niece, Kylie May Smith, was among the victims.
"Pray for the other families who have lost their child, or are waiting to hear news," she wrote on Facebook. "Just pray for Tumbler Ridge."
McDonald said police had seized firearms from the family residence about two years ago but returned them after the owner, who he did not identify, successfully appealed the decision.
Van Rootselaar previously had a firearms licence, but it expired in 2024.
Lifeline 13 11 14
beyondblue 1300 22 4636