A school resource officer was honored at an Illinois high school graduation for his heroic actions after he stopped a school shooter from taking any lives.

Officer Mark Dallas received a standing ovation Sunday as he led Dixon High School students into their graduation ceremony. Matthew Milby, 19, brought a gun into the school and shot at a coach during graduation practice, but Dallas was able to take the shooter down as students ran for their lives, police said.

"Today would not have turned out the same without you being here, so from the class of 2018, we love you,” senior class vice president Emma Krull said from the stage. “You, Mark Dallas, are our hero, and we are all Dixon strong.”

Because of Dallas’ actions, 182 seniors were able to walk across the stage and receive their high school diplomas – each shaking their hero’s hand, and one, Dallas’ son, Josh, giving him a hug.

"I never would have thought, 'Oh, it's going to happen in Dixon,' and it happens at graduation practice," senior Ashely Jones told FOX 32.

Police say Milby, who is being held on a $2 million bail after being charged with firing shots, suffered non-life threatening injuries.

Dixon’s graduation came just days after the Santa Fe, Texas school shooting that killed 10 people.