A 16-year-old student stabbed a school resource officer Tuesday morning at a Wisconsin high school before the officer shot the student, police said. It was the second shooting at a school in the state in as many days.

Both the student and the school resource officer were injured and transported to hospitals following the incident at Oshkosh West high school, Oshkosh police say. Neither suffered what were expected to be life-threatening injuries.

The school resource officer alerted other Oshkosh police officers about an altercation with the student at 9:12 a.m, Chief Dean Smith said. The officer said the student brandished an "edged weapon" and stabbed the officer in his office, Smith said. Smith wouldn't say whether the weapon was a knife. The officer opened fire and struck the student once.

Get Breaking News Delivered to Your Inbox

Other officers arrived and began life-saving treatment on the officer and student. Some students were evacuated from the school while others sheltered in place.

The case was being turned over to state criminal investigators.

A senior identified only as Josh told the Journal Sentinel that he heard gunshots.

"I was walking in the hall, and a teacher shoved me into a classroom, and we started barricading the doors, and we all huddled in the corner, and there were gunshots," he said.

Officers respond after a school resource officer opened fire on a student who stabbed him at an Oshkosh, Wisconsin high school Tuesday CBS affiliate WDJT-TV

The Reverand John Seelman, pastor of Immanuel Lutheran Church across the street from the school, says he saw one person being transported from the school in a wheelchair who was taken away in an ambulance, and another who was carried out on a stretcher.

Stephanie Carlin, who is the mother of a sophomore and a senior at Oshkosh West and a school board member, told The Associated Press that one of her sons texted her to say, "it was crazy," but that both of her sons were safe.

"As a parent, it's terrifying," Carlin said. It's a parent's "worst nightmare."

The incident comes a day after an officer shot an armed student at another Wisconsin high school, about 80 miles south in Waukesha. The student was injured in the shooting Monday at Waukesha South High School.

Police said Tuesday say the 17-year-old student had pointed a pellet gun at another student's head during a fight between the students Monday. Police said Tuesday that a school resource officer and a detective began talking with the student after the fight.

Police say the teen had a gun in his hand when an officer shot him once in the leg and twice in the arm.

Authorities immediately gave the student first aid, stopping the bleeding. The student is in stable condition.

Police found two firearms in the classroom and say both were pellet guns. Police later searched the student's home and found more pellet guns.