The Lee County State's Attorney has charged 19-year-old Matthew Milby of Dixon with three charges of aggravated discharge of a firearm, all Class X felonies. Bond was set at $2 million, though Milby remains hospitalized as of Wednesday night. Illinois State Police said their investigation is ongoing and more charges are possible.
Dixon Police Chief Steven Howell Jr. said school resource officer Mark Dallas called emergency responders, just after 8 a.m. to report shots had been fired near the high school gymnasium.
WATCH: "I thought it was going to be another mass shooting"
Dixon High School student speaks about shooting
Howell said Dallas ran toward the shots, coming face-to-face with Milby, a former student, holding a gun.
Milby ran away and out of the school. Police said he fired at Dallas when he tried to chase him down. That's when the officer fired back, hitting and injuring Milby.
"I could not be more proud of the police officer and the way he responded to the situation. While shots were ringing out through the hallways of the school, he charged towards the suspect and confronted him head on," Howell said.
Milby was the only person hurt in the incident, police said. He was taken into custody and treated for his wound, which city officials said was not life-threatening. He is expected to recover.
Brandon Stehl and Evelyn Ebersohl were both inside the gym when he heard the gun go off.
"Then all of a sudden you hear the gunshots and everybody just looks over. People were laughing at first and then pandemonium broke out. People were rushing out all through the same door, it was just complete panic," Stehl said.
"I think it was very brave of him. You hear stories of officers hiding, not doing anything, and that's not what he did. He went in and faced the problem head on," said Ebersohl.
Students and staff were quickly evacuated from the campus.
More than 100 people gathered along the Rock River Wednesday night to offer praise and thanks to Dallas that the shooting was not worse.
"One second sooner, one second later we could be looking at a very different situation right now," said Leah Saunders, who teaches at a neighboring school.
While police were quick to say there was no further threat to people in the area after the shooting, Dixon Public Schools remained on lockdown for some time.
Julie Milby, the alleged shooter's mother, said her son was ostracized at school and left to finish his credits outside of class.
"I know that he's been very sad for a long time," she said. "Well, my kid is laying up at the hospital shot. Thank god they didn't kill him, that's a blessing. Thank god he didn't kill anyone else."
Julie grew up with Dallas, the school resource officer.
"I honestly would have to tell him thank you because I think in most cases they would kill him," she said.
When officers went inside the high school, they said they saw students and teachers barricaded in their classrooms as they should have been. They have been going through training on what to do during an active-shooter situation. Authorities said they did everything right.
"A lot of things went right today, when a great many of them could have gone wrong," Dixon Mayor Liandro Arellano Jr. said at a press conference Wednesday.
Rep Adam Kinzinger was briefed on the situation by Lee County Sheriff John Simonton. Kinzinger thanked the school resource officer in a statement released Wednesday:
"As we continue to gather more information about the shooting incident at Dixon High School this morning, I extend my deepest gratitude to the Dixon Police Department, and especially the School Resource Officer (SRO) on-site, for their swift action today and for keeping our students, teachers, and our community safe."
Dallas is a member of the Dixon Police Department. He was placed on administrative leave, since he was involved in the shooting.
Chopper 7 HD was over the scene around 9:30 a.m. and captured video of students boarding buses to be reunited with family members, who were waiting for them at a local park.
WATCH: Chopper 7 HD over Dixon High School
Armed male shot at police officer at Dixon High School, city says