The Royal Canadian Mounted Police said the transgender teen behind Canada’s second-deadliest school shooting began identifying as female at age 12, about six years ago, and noted that officers had been called to the family home multiple times over the years in connection with mental health concerns.

Jesse Van Rootselaar stopped attending school four years ago, when he was 14, and at one point was “apprehended for assessment” under Canada’s mental health legislation, reports The Daily Mail.

A photo has also emerged of the 18-year-old transgender individual in a troubling photograph holding an assault rifle, smiling. Rootselaar allegedly shot and killed his mother and brother before carrying out a deadly attack at Tumbler Ridge Secondary School in British Columbia, where six people were killed, making it the second-worst school shooting in Canada’s history.

The shooting unfolded Tuesday afternoon when Van Rootselaar opened fire inside the school library. A female teacher was killed, along with three girls and two boys ranging in age from 13 to 17. Authorities said the shooter died by suicide at the school.

Van Rootselaar was known to have used his mother’s last name, Strang, socially and while attending school. The Royal Canadian Mounted Police identified him publicly on Wednesday and referred to him as a woman.

“Police have attended that residence in the past, approximately a couple of years ago, where firearms were seized under the Criminal Code,” said Dwayne McDonald, Deputy Commissioner of British Columbia RCMP. “I can say that at a later point in time, the lawful owner of those firearms petitioned for those firearms to be returned, and they were.”

The Daily Mail reported that sources said Van Rootselaar lived in a home with three relatives. People familiar with Van Rootselaar described him as a “quiet kid” who was frequently observed “sitting by himself in the corner.”

Residents received an emergency alert at approximately 1:20 p.m. local time Tuesday, warning of an active shooter. About ten minutes later, a lockdown alarm echoed through the school’s hallways, directing students and staff to barricade themselves inside classrooms.

Darian Quist, a senior at the school, told CBC he was attending a mechanics class when the lockdown order was issued. “For a while, I didn’t think anything was going on,” he said. “I thought it was just like maybe a ‘Secure and hold’ but once everything starts circulating, we kind of realized something was wrong.”

Quist said he and his classmates hid for more than two hours, fearing for their lives, until police finally escorted them out.

He described the classroom atmosphere as “very nervous,” adding that the situation became even more distressing after he received graphic images from inside the school on his phone.

“Once people sent me some photos, it definitely set in what was actually happening,” the student said.

“They [the photos] were disturbing, just showing blood and things like that. That’s when it all really set in.”

Quist said their teacher acted quickly, instructing students to push tables against the doors and plan a possible escape route.

They waited until officers entered the room, Quist said, “police came through the door, yelling, ‘Hands up, hands up.’”