CHICAGO (CBS)– The 19-year-old former Dixon High School student charged with firing shots at a school resource officer has been released from the hospital, and transferred to the Lee County Jail.

Matthew Milby was taken to Katherine Shaw Bethea Hospital in Dixon after he was wounded in a shootout with Dixon High School resource officer Mark Dallas on Wednesday outside the school auditorium.

Milby, a former student, is being held on $2 million bail, charged with three counts of aggravated discharge of a firearm.

Dallas was on duty at the school Tuesday morning at 8 a.m. when he heard several shots fired near the school auditorium. Students were inside preparing for a graduation ceremony rehearsal.

Officer Dallas rushed to the area and confronted Milby, who fled on foot outside the school.

Milby fired several shots at Officer Dallas. The officer returned fire, shooting the suspect.

Students told reporters Dallas has two kids at the school. He has worked at the school for five years and has more than 20 years of experience law enforcement.

Dallas was hailed for his heroism by Dixon Police Chief Steven Howell.

“While shots were ringing out through the hallways of the school, he charged toward the suspect and confronted him head on,” Howell said. “ Because of his heroic actions, countless lives were saved.”

It’s still unclear how Milby was able to get into the school. His mom told reporters he was supposed to be there yesterday to pick up his cap and gown for graduation this Sunday.

School officials were allowing students to come by and pick up personal items Thursday. Seniors also have a graduation practice scheduled.

Police said the investigation is continuing, and Milby could face additional charges.