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.