A police officer at a northern Illinois high school was hailed as a hero Wednesday for shooting and arresting a former student who fired on him in a hallway while staff and seniors were meeting for a graduation rehearsal.\r\nThe 19-year-old former Dixon High School student suffered wounds that weren\u2019t life threatening, according to police, who didn\u2019t release his name. The school resource officer, Mark Dallas, took the gunman into custody after shooting him.\r\n\u201cHe saved an enormous amount of lives,\u201d Lee County Sheriff John Simonton said. His comments were echoed by Illinois Gov. Bruce Rauner, who in a statement credited \u201cDallas for his bravery and quick action to immediately diffuse a dangerous situation.\u201d\r\nThe shooting happened shortly after 8 a.m. while staff and students were gathered for a graduation rehearsal.\r\n\r\nPolice Chief Steven Howell Jr. said several shots were fired near the auditorium, and Dallas rushed to the area to confront the gunman.\r\nHowell said Dallas chased the suspect after he fled from the school. The suspect fired several shots at the officer, who returned fire, wounding the suspect and taking him into custody.\r\nNeither Dallas, who\u2019s been a resource officer at the school for five year, nor anyone else at the school was injured. Police said they believe the gunman acted alone and that there was no further threat to anyone in the area. Howell declined to discuss why the former student brought a gun to the school.\r\n\u201cI 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,\u201d Howell said of the 15-year veteran of the Dixon Police Department. \u201cBecause of his heroic actions, countless lives were saved. We are forever indebted to him for his service and his bravery.\u201d\r\n\r\nWhen police searched the school they found that the faculty and students had barricaded themselves inside by blocking the classroom doorways with desks, chairs and other furniture \u2014 just as they had been trained to do.\r\n\u201cA lot of things went right today and many things could have gone wrong,\u201d Dixon Mayor Liandro Arellano Jr., told reporters at a news conference outside the school.\r\nOfficials said all schools in the city about 80 miles (130 kilometers) west of Chicago were placed on lockdown in the immediate aftermath of the shooting. The other schools re-opened after officials determined the gunman acted alone.