A police officer shot at a rifle-slinging assailant who opened fire outside a Wisconsin high school, striking two students leaving prom late Saturday, authorities said. The shooting hospitalized three people — including the shooter — after the 11:15 p.m. incident outside Antigo High School 70 miles northwest of Green Bay.

“We’re looking at the victims, hoping everything comes through with them,” Antigo police Chief Eric Roller said at a media briefing early Sunday. At least one of the victims was hospitalized in critical condition, fire officials said initially.

The victims and shooter were not immediately identified and it’s unclear if the shooter was a student.

An officer patrolling the school returned gunfire “stopping the threat” after hearing gunshots, Roller added in a police statement.

A prom DJ said authorities quickly locked down the school with guns drawn after he spied a commotion outside the gym entrance.

“Hats off to them, they did their job,” Brandon Irish told the Daily News.

He said police cordoned students inside the gym until about 1 a.m. Sunday.

“You hear about it, but you don’t think it’s going to happen close to you,” Irish said. “We’re a really tight knit community. Everybody knows everybody.”