"The suspect a 17-year-old male, was transported to the hospital and was stable": Cops (File)

A 17-year-old student was shot and wounded inside his Wisconsin high school by a police officer after bringing a handgun into the building and failing to comply with orders to surrender the weapon, officials said.

Waukesha South High School, about 20 miles (32 km) west of Milwaukee, was put on lockdown and then dismissed for the day after the shooting, police said.

The incident occurred after the student pulled out a handgun and did not respond to the school resource officer's insistence that he give it up.

"The suspect is a 17-year-old male, he was transported to the hospital and was in stable condition," Waukesha Police Chief Russell Jack told reporters outside the school on Monday. "No officers or other students were injured in this incident."

Jack praised the fast response of the school resources department and other officers at the scene. He said the officer who injured the student appeared to have "acted within state statute and department policy," resorting to gunfire only when de-escalation efforts failed.