ANTIGO, Wis. (AP) – An 18-year-old gunman opened fire outside of a high school prom in northern Wisconsin, wounding two students before a police officer who was in the parking lot fatally shot him, authorities said Sunday.

The attack happened late Saturday outside the Antigo High School prom, said Eric Roller, the chief of police in Antigo, a community of about 8,000 people roughly 150 miles north of Milwaukee.

Roller said the gunman – later identified as Jakob E. Wagner – shot the two students as they exited the building, though he didn’t say if investigators believe they were specifically targeted or discuss a possible motive for the attack.

“Officers were in the parking lot patrolling the activities and heard the shots and an officer immediately fired upon the shooter, stopping the threat,” he said. He said the gunman was then taken into custody.

Join The Conversation On The KDKA Facebook Page
Stay Up To Date, Follow KDKA On Twitter

Wagner and the two victims – a male and female whose identities haven’t been released – were taken to hospitals. Langlade County Coroner Larry Shadick told The Associated Press that Wagner died shortly after 1 a.m. in the intensive care unit of a Wausau hospital. He said further details would have to come from police. Roller didn’t respond to repeated requests for further information.

The female victim was treated and released and the male victim was undergoing surgery for injuries that weren’t life-threatening, police said.

After the attack, students were escorted from the prom to safety and the victims’ families were notified.

(Copyright 2016 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.)