11/02/2016 05:48 EDT | Updated 11/03/2016 04:45 EDT

Gabriel Klein Charged In Abbotsford Secondary Stabbing

Gabriel Klein was named in court records on Wednesday.

ABBOTSFORD, B.C. — Charges have been laid against a homeless man in an apparently random high school attack that left a 13-year-old girl dead and her 14-year-old friend injured.

Sgt. Jennifer Pound of the Integrated Homicide Investigation Team said Wednesday that 21-year-old Gabriel Klein has been charged with second-degree murder and aggravated assault in the stabbings that happened at an Abbotsford, B.C., high school a day earlier.

"Evidence suggests this attack was random,'' Pound said. "We do not believe the suspect has ties to the school, to the two girls, or to the Abbotsford community.''

Police and school district officials say a barefoot man walked into the school and attacked two girls before staff confronted and restrained him.

This photo of Klein was captured through CCTV just hours before the Abbotsford Senior Secondary Attack. IHIT is asking anyone who knows information about him to contact police. (Photo: IHIT)

The two students haven't been named by police.

Amsuman Nair was at the high school on Wednesday where a memorial of cards, flowers, notes and candles was growing. He was a friend of both girls.

"They used to be happy and always dancing around, having fun,'' Nair said. "But one of them is gone and it's hard to believe.''

Nair said he was writing a math test when he heard screams coming from the hallway and his classroom went into lockdown.

Klein appeared in court on Wednesday and is expected to return Nov. 7.

Police tape surrounds the outside of Abbotsford Secondary School in in Abbotsford, B.C., Wednesday, Nov. 2, 2016. (Photo: CP)

Police said they knew little about the man. He didn't have a past criminal record and had no fixed address.

Pound said it's believed that Klein was from Alberta and she made a plea to anyone who may know him to call police.

"Until we can learn a little bit more on who this individual is, we're not going to have a definitive (answer) on what that motive looks like.''

Pound said the selfless actions of school staff who confronted the man likely prevented more people from being injured.

Two students lay flowers down at a makeshift memorial outside the school on Nov. 2. (Photo: CP)

Abbotsford school district Supt. Kevin Godden also praised the school's staff for their actions.

"What I will say was in the middle of this horrific situation they stopped this individual, first by just yelling at him and then the staff converged on him and got him. The knife fell from his hands and they got him to take a seat while they held him in some restraint and then provided first aid to the students, who were obviously hurt.''

Every school in the Abbotsford district locked all but one of its doors on Wednesday, in what Godden called a precautionary measure.

Officials ask that video not be shared

There was a video circulating of the stabbing, and Godden asked people to stop sharing it.

"This video is a trigger to trauma, not only for our students and our community but for any person that has been involved in a traumatic incident.''

Police also asked that the video not be shared.

It was taken from what appears to be the second floor looking into the school's atrium and shows a man in a grey T-shirt standing over a girl and frantically stabbing at her as she screams on the floor. A person in an apron then approaches the man, who suddenly drops his weapon and backs away.

Godden said there was nothing to stop the man from walking in to the school.

Nothing to stop strangers entering schools: Supt.

"Our schools are closed campuses to the extent that we keep our kids in and have lots of adult supervision,'' he said. "But there is nothing that would preclude any stranger from walking into school.''

He said anyone who doesn't attend the school or work there is expected to check in at the office.

Prime Minister Justin Trudeau tweeted his condolences to the family.

"As a parent, it is heartbreaking to hear of the tragedy at Abbotsford Senior Secondary. My thoughts are with the entire school community,'' Trudeau said on Twitter.

A teddy sits outside the school on Nov. 2. (Photo: CP)

Premier Christy Clark offered her condolences to the families of the victims at a news conference Wednesday, saying she was shocked by the incident.

"Schools are very safe places in British Columbia, but the fact that this kind of thing can happen ruptures our sense of security.''

The premier also commended school staff who helped stop the attacker.

"Those of us who might know what to do and when to do it might in that moment not find the courage to step in and they both did,'' Clark said. "We should be very, very grateful to them for that.''