It's a scenario that teachers, parents, and administrators hate to even consider.
But a school shooting situation could happen anywhere - so school officials know they have to have plans to keep everyone safe.
That's why Kenmare High School was the setting this week for an exercise including a gunman roaming the halls, firing off shots.
Jim Olson shows us what happened.
The man playing the role of deranged gunman was ready.
"I have a plan in my mind, I do."
That plan started in an imaginary lunch break at Kenmare High School - with gunfire.
It's what authorities call an "active shooter," someone firing shots in public. And for Superintendent Duane Mueller, it put the schools emergency plans into action - he immediately announced a lock down, telling teachers to make sure students were out of hallways and hiding in classrooms and other areas.
(Duane Mueller, Kenmare Superintendent) "We're going to practice our procedures...and, the best laid plans...there are always flaws in it so we're going to put it to the test and see what we have."
In addition to testing the school staff, the exercise put law enforcement and emergency medical personnel to the test. First up - the police, sheriff's deputies, and other law enforcement agents storm into the building - looking for the active shooter - while evaluators watch the exercise to grade everyone's work. Our imaginary gunman wants to put the first responders to the test.
"In a perfect world I would try to draw them into a bad case scenario for them."
And in this case, that means trying to ambush the deputies as they search for him.
"Which way did he go?"
The shooter wounds one officer, but others are able to confront him in the gymnasium - a perfect spot since there are no civilians nearby. After a brief firefight, the good guys get the job done.
"Suspect is down. Repeat, suspect is down"
"Where did they get you?"
"I think perhaps in the back of my head."
But before suffering his fatal wound, the shooter has wreaked havoc around the school - putting EMS crews to their test.
"Is he conscious? Yes he is"
They spread out around the school, locating victims, assessing their wounds, and making plans to get them to hospitals.
"I want this one transported and I want that one transported, along with the one they're bringing right now."
The exercise includes men and women from many agencies - some whose job it is to block access to the school. But the scenario imagines a panicked parent rushing into the building, screaming her worries.
"Where's my kid? Where's my kid? There's a school shooting!"
All in all, it's a pretty realistic test for people who hope they never have to do anything like this for real.
(Amanda Schooling, Ward County Emergency Manager) "We have a great group of people here that really want to work toward making Kenmare school a lot safer as well as aware of things that can happen."
In Kenmare, Jim Olson, KX News.