An officer at a high school in Waukesha, Wis., shot and injured a student who had a gun and pointed it at law enforcement authorities as they were trying to convince him to hand it over, officials said on Monday.

The episode unfolded at Waukesha South High School at about 10:17 a.m., after a student informed the authorities that another student had a handgun, the chief of the Waukesha Police Department, Russell Jack, said.

As a school resource officer went to the classroom and moved other students to safety, additional law enforcement units were dispatched to the building, he said at a news conference.

Officers tried to talk with the student, a 17-year-old male, but he would not remove his hands from his pockets, and he took the gun from his waistband and pointed it at them, the chief said.