An eastern Illinois high school teacher tackled a rampaging gunman in the school's cafeteria Wednesday, saving lives and preventing what could have been a much bigger tragedy, authorities said.

One student was injured in the shooting at Mattoon High School and police said, if not for Angela McQueen’s quick-thinking, more children would certainly have been hurt, if not killed.

McQueen, 40, a math and gym teacher, was able to subdue and disarm the student before anyone was fatally injured.

"She's been trained obviously, but in these scenarios, you just don't know what's going to happen until it happens," Mattoon Police Chief Jeff Branson said during a press conference Wednesday night according to the Shelbyville Daily Union.

“Had the teacher not responded as quickly as she had I think the situation would have been a lot different.”

The student gunman is in custody, but his name has not been released because he’s a minor.

The school released a statement on social media following the event.