A teacher who calmly asked a 14-year-old boy who twice burst into his classroom brandishing a .22-caliber revolver "What can I do, and how can I help you?" is credited with averting potential bloodshed at Hastings Middle School on Monday morning.

A day after an eighth-grader pointed a loaded gun at staff and students -- but fired no shots -- teacher Michael Rapatz was among those back in class Tuesday, ready to resume his 22nd year of handling eighth-graders at the school.

At 10:30 a.m. Monday he had just begun his fourth-hour Earth Science lesson when the terror began.

"I had just finished taking attendance and just introducing the lesson and activities that we were going to be doing for the day. ... My classroom door was open," Rapatz said. A student who was supposed to be in Rapatz's class at that hour entered -- with a drawn pistol.

"It didn't seem like he was pointing it at any particular student, he was kind of moving it around," Rapatz said. "My response -- first of all, I was shocked and surprised -- but within a second or two of seeing the pistol, it was 'Hey, let's stay calm here. What can I do, and how can I help you?' is what I remember saying. And his response was, he wanted everyone to get on the ground."

Rapatz said he held steady and didn't respond to the demand. "He was pretty much in control and anything could have happened. I was just trying to calm the situation. I was trying to defuse it."

The boy again demanded, more forcefully, that the students lay on the floor. Rapatz told the boy: "No. I can help you; what do you need?" The boy turned and left without saying a word, Rapatz said.

The teacher, who has two teenage sons of his own, then called the office, and the school went into lockdown.

As his class of 30 eighth-graders sat calmly on the floor in the back of the classroom behind their lab stations, they could hear breaking glass as the boy tried to get into other locked rooms.

He returned to Rapatz's class a second time, breaking through a window of the now-locked door. One more time, Rapatz asked if he could help the boy, and once again the boy left without a word.

Through it all, Rapatz said, his students stayed calm. "I was proud of the way my students acted," he said. "They did everything as they should have for the lockdown."

Sgt. Wayne Hicks, the liaison officer for Hastings schools who was among those who helped apprehend the boy, said students took their cue from Radatz's unruffled response, and kept the situation from escalating.

"He has just such a nice-natured demeanor with him," Hicks said. "He acted appropriately. I really believe it helped stop that student from doing more foolish things."

Hastings Police Chief Michael McMenomy said the gun wasn't fully loaded, nor had the boy brought extra ammunition, though an unspent bullet was found in a hallway. The gun had been stored in a locked cabinet at the home of the boy's foster parents, but he was able to find the key.

It is still unclear why the boy fired no shots, or what prompted the incident, though McMenomy said he was "having some issues with a particular group of kids." The boy, who was awaiting charges in the Dakota County Juvenile Detention Facility, had no previous run-ins with Hastings police, nor were school officials aware of clashes between the boy and other students.

Principal Mark Zuzek said about 50 students sought assistance from extra counselors made available at the school. Different kids can react differently to trauma, he added.

Some who are close to a tense situation can be seemingly unaffected, while those who are removed from it can take it hard. The school's job in monitoring that isn't over.

For the most part, the sixth- through eighth-graders were unshaken on Tuesday, said Assistant Principal Allen Saunders. "They were talking about it at lunch, they were talking about it to each other, they were talking to teachers."

It was very much on the minds of parents picking up their children.

"We moved here from California to get away from that," said Pete Ventura, whose sixth-grade daughter had called on a cell phone to say the school was in lockdown. Though the boy was quickly caught, "I was still scared," said Stephanie Ventura.

Elizabeth Matzke's seventh-grade son was in gym class when the school locked down. "The school was right on the ball," she said. Matzke said she wonders what prompted the boy's actions. "I just hope there are conversations about that -- about how children treat each other."

Amid lingering anxiety, there was a huge sense of relief that a potential tragedy was avoided.

"It's gone as well as bad things go," Zuzek said. "I mean, this is nothing you'd wish on anybody but, God willing, the kids are safe."

Jim Anderson • 612-673-7199