The shotgun was hidden under a garment bag as the student entered the school.
Moments later, a frantic evacuation was underway after a report of an “active shooter” - a sequence of events all too familiar, from Newtown, Connecticut, to Parkland, Florida.
But then something unique happened because of a quick-thinking high school football coach.
He grabbed the gun from the suicidal student and hugged him.
Surveillance footage from Parkrose High School in Portland, Oregon, showed coach Keanon Lowe, 27, who also worked as a school security guard, embracing student Angel Granados-Diaz, then 18, after Lowe handed off the weapon to another adult.
The episode happened on May 17, but the local news station KOIN 6 aired the footage Friday after obtaining the video from prosecutors through a public records request.

The student had made suicidal statements in the lead up to the incident. Source: The New York Times
A student reported to school administrators that Mr Granados-Diaz had made suicidal statements and had been experiencing a “mental health crisis,” the Multnomah County District Attorney’s Office said in a news release.
Mr Lowe was sent to locate Mr Granados-Diaz. At the time, the student was in the restroom with a shotgun.
When the student exited the restroom, he pointed the shotgun, which was legally purchased and contained one round, at himself and tried unsuccessfully to fire, the release said. Lowe was able to take it from the student.
After that, Mr Lowe hugged Mr Granados-Diaz for at least 20 seconds, the footage showed.
“Pretty crazy situation,” Mr Lowe, a former football player for the University of Oregon and former analyst for the Philadelphia Eagles and the San Francisco 49ers, said in a news conference in May, according to KOIN.

“In a fraction of a second, I analyzed everything really fast. I saw the look in his face," said coach Keanon Lowe. Source: The New York Times
“In a fraction of a second, I analysed everything really fast. I saw the look in his face, the look in his eyes. Looked at the gun. Realized it was a real gun and then my instincts just took over. I lunged for the gun.”
Mr Lowe said students were screaming and running out of classrooms, but he made sure the weapon was not aimed at anyone else.
“I think I’ve gone through stuff in my life that prepared me for that moment, and I’m lucky and I’m happy that I was in that classroom for those kids and I was able to prevent that tragedy,” he said.
“I don’t know if ‘hero’ is the right word, but the universe works in mysterious ways, and I was meant to be in that classroom.”
Mr Lowe said during those moments in which he hugged Mr Granados-Diaz, they had a “real-life” conversation.
“Obviously, he broke down and I just wanted to let him know that I was there for him,” Mr Lowe said.
“I told him I was there to save him - I was there for a reason and that this is a life worth living.”
Mr Lowe was hailed for his quick assessment of the situation and composure under pressure.
Bruce Alexander, who has worked in law enforcement, government counterterrorism and private security for 30 years, said every second is critical in the type of threat that Mr Lowe defused.
“In these kinds of tactical situations, the longer there is a delay in the reaction, the higher the probability exists of a larger casualty situation,” said Mr Alexander, who is president of Security 1 Solutions.
“It’s the typical freeze-or-flight kind of syndrome.”
For Mr Lowe to hand the shotgun over and then have the presence of mind to show empathy toward Mr Granados-Diaz was a deft handling of a tragedy in the making, he said.
“I think it says a lot about his character,” Mr Alexander said.
“It’s a remarkable feat.”
Mr Lowe did not immediately respond to requests for comment Saturday.
Michael Lopes Serrao, superintendent for the Parkrose School District, said he was disappointed the video was released and noted that the district had denied a public records request for the footage.

Coach Keanon Lowe disarmed the student before passing the weapon to another adult. Source: The New York Times
“This was a traumatic event for our students, staff and community,” he said in a statement.
He said the school “has been through a great deal due to this unfortunate event, and we will continue to do our best to keep our students and staff safe".
Mr Granados-Diaz, who faced weapons possession and related charges, pleaded guilty to one count of possession of a firearm in a public building and one count of unlawful possession of a loaded firearm in public, the district attorney’s office said.
He was sentenced this month to 36 months of probation and to complete 64 hours of community service within one year, among other conditions. His lawyer did not immediately respond to a request for comment.
“This sentence is appropriate, as it affords ongoing supervision and safeguards and simultaneously affords Mr Granados-Diaz with an opportunity to move past this incident so that he can continue to heal,” Parakram Singh, the deputy district attorney, said in a statement.