There was almost a school shooting in Oregon in May.  But a football coach stopped it.  Now the security footage is going viral because of HOW he did it.

Keanon Lowe was a wide receiver at the University of Oregon from 2011 to 2014.  Now he coaches football and track at Parkrose High School in Portland.

Back on May 17th, a student named Angel Granados-Diaz walked into class with a loaded SHOTGUN.  It turned out he has mental health issues and was depressed after a breakup with his girlfriend.

But luckily Keanon had just walked in SECONDS earlier.  And he was able to grab the gun . . . wrestle it away from him . . . hand it to another teacher . . . and get the kid out in the hallway.  So no one was hurt.

Then once he knew everyone was safe, he just wrapped the kid in a huge HUG and kept hugging him for over a minute.

They eventually sat down in the hallway and talked for almost ten minutes until police got there.  Keanon says he could tell the kid was having some sort of breakdown.  And he felt a lot of compassion for him in the moment.

The kid ended up pleading guilty to several charges, and a judge sentenced him to three years of probation this month.  He also has to continue getting treatment for his mental health.

(Fox News / KATU)