A potential school shooting in central Illinois ended when a school resource officer shot and wounded an armed former student who opened fire Wednesday morning.

The 19-year-old suspect, who arrived armed at Dixon High School about 8 a.m., shot at the officer who then returned fire, injuring him, police chief Steven Howell said at a news conference.

Howell commended the quick response of the school resource office for his fast response.

“I could not be more proud of the police officer and the way he responded to the situation. With shots ringing out through the hallways of the school, he charged towards the suspect and confronted him, head on,” Howell said. “Because of his heroic actions, countless lives were saved. We are forever indebted to him for his service and his bravery.”

Howell said the suspect had fired several shots near school gym, where the resource officer confronted him. The suspect then ran away, and shot back at the officer, who had pursued after him. The officer fired back, wounding the suspect, who was then taken into custody.

The former student who was shot is believed to have sustained non-life threatening injuries and is currently receiving medical treatment, Howell said. The officer who shot him was not harmed and will be put on paid administrative leave, per a department policy. No Dixon High students or staff were injured in the incident.

Dixon City Manager Danny Langloss said students were gathered in the school gymnasium for graduation practice when the gunfire exchange occurred. He believes the suspect acted alone and that there are not further threats to student safety.

Dixon is a central Illinois city about 100 miles west of Chicago. While all Dixon public school were put on lockdown earlier in the day, only Dixon High School remains on lockdown.

Parents were being told to pick up their children at nearby Al Morrison Baseball Field, WQAD reported.

Get The Brief. Sign up to receive the top stories you need to know right now. Please enter a valid email address. Sign Up Now Check the box if you do not wish to receive promotional offers via email from TIME. You can unsubscribe at any time. By signing up you are agreeing to our Terms of Use and Privacy Policy . This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply. Thank you! For your security, we've sent a confirmation email to the address you entered. Click the link to confirm your subscription and begin receiving our newsletters. If you don't get the confirmation within 10 minutes, please check your spam folder.

Write to Mahita Gajanan at mahita.gajanan@time.com.