(ROCKFORD, Wash.) -- When a Washington state high school student confronted a classmate who was armed with an automatic rifle and a semi-automatic handgun inside the school, authorities said the student "tried to talk" the armed classmate "out of it," but the gunman fatally shot him.
"That young man gave his life ... to save his fellow classmates," Spokane County Sheriff Ozzie Knezovich told reporters Thursday.
The shooting took place Wednesday at Freeman High School in Rockford, Washington.
According to ABC Spokane affiliate KXLY, friends and family identified the victim as sophomore Sam Strahan.
"My heart goes out to her because she lost her husband three months ago,” Knezovich said, referring to Sam's mother.
"There’s nothing like that scream. You will never forget it," he said. "I heard it one too many times. Half her family is now gone. Partly because of senseless violence.”
Three other students were injured in the shooting and were transported to a local hospital.
According to court documents, surveillance video showed the suspect -- who has since been taken into custody -- pull out two weapons -- an automatic rifle and a semi-automatic handgun -- inside the school that morning.
But Knezovich said the automatic rifle jammed.
"Thank God he had jammed that AR up so badly that it was not going to function," Knezovich said.
The suspect "transitioned to that pistol, and when one of the classmates that he knew came up to him and tried to talk him out of it,” the suspect fatally shot him, the sheriff said.
The suspect, who is a juvenile and is not being named by ABC News, ultimately surrendered to a janitor who ordered him to lay down on the floor, the documents said.
Knezovich said the janitor "confronted him, ordered him to the ground and held him there,” and then a school resource officer rushed in and helped the janitor take the suspect into custody.
The families of the three injured students released a statement through the hospital where the students are being treated, saying, "In this, our darkest hour, we feel blessed and lucky in so many ways. Our daughters are recovering from their wounds, and we know that your thoughts and prayers are with us."
They added, "Our hearts are breaking for another family in our community who lost their son. We are keeping Sam’s family in our thoughts and prayers."
"We wish to express our overwhelming gratitude for the outpouring of support and love you have shown our families in our time of need," the families said. "Everyone – our friends, Freeman School District, first responders, the trauma team and care providers at Providence Sacred Heart Medical Center & Children’s Hospital, the communities of Freeman and Rockford as well as Spokane – have all been phenomenal. No words can express our gratitude."
Copyright © 2017, ABC Radio. All rights reserved.