A cop in Wisconsin shot down a teen gunman after he opened fire outside school formal, injuring two students.

Police have identified the gunman as 18-year-old Jakob E. Wagner. On Saturday, he shot a girl and a boy with a rifle as they left the high school formal in Antigo. Police chief Eric Roller, who was in the parking lot then shot him.

Roller said, “officers were in parking lot patrolling the activities and heard the shots and an officer immediately fired upon the shooter, stopping the threat.”

Whether the two students were specifically targeted or not and the possible motive for the shootings are not revealed by the investigators, NEWSJS.COM reported.

A statement released by Unified School District of Antigo said that Wagner approached the school with a high-powered rifle and a large ammunition clip. The statement also said that the prompt action by police and district staff saved the building and “prevented what might have otherwise been a disaster of unimaginable proportions.”

Governor Scott Walker also praised the police for the prompt action.  He said in a statement that the actions of Antigo Police Department “undoubtedly saved lives.”

Donald Childs, the interim district administrator, said that at first it appeared that Wagner intended to enter the building and shoot at people at the dance.

Childs noted, “We have no reason to believe at this point it was targeting anybody specifically.”

Meanwhile, the teen gunman Wagner’s friends said that he was raised by his mother and grandparents and interested in guns, as stated by news.com.au.

Dakota Mills, who knew Wagner from sixth grade, said that he wanted to be a hunter and had completed hunter safety course. However, whether the gun belonged to him is not clear.

Mills informed that Wagner loved video games and music. He was also in the school’s marching band.

Another student, Dylan Dewey, who graduated from Antigo High School last year said that Wagner was dating a girl who broke up with him last month.

Wagner died in the intensive care unit of a Wausau hospital, said Langlade County Coroner Larry Shadick. The female victim was treated and released but the boy was undergoing a surgery for wounds that were not life-threatening.

Last year in October, 10 people were killed  at a school in Oregano when a 20-year-old gunman opened fire.