This is an archived article and the information in the article may be outdated. Please look at the time stamp on the story to see when it was last updated.

Although a school resource officer did fire at the teen who’d shot two fellow students at a Maryland high school last week, the shooter died of a bullet from his own gun, authorities say.

Austin Wyatt Rollins — a 17-year-old who killed one student and injured another — shot himself in the head in a hallway at Great Mills High School on the morning of March 20, right as school resource officer Blaine Gaskill fired his gun at him, the St. Mary’s County Sheriff’s Office said.

The officer’s shot struck Rollins’ gun, which was in the teen’s hand, the sheriff’s office said.

Nevertheless, Gaskill’s quick action — confronting Rollins just three minutes after the teen shot two students — has been credited with bringing the incident to a quick end. That praise came even when it was unclear which shot killed the teen.

“He responded exactly how we train our personnel to respond,” St. Mary’s County Sheriff Tim Cameron told reporters before investigators determined Rollins killed himself.

Police say Rollins shot two people with one bullet in a school hallway just before classes began. He shot Jaelynn Willey, 16, in the head — and the bullet also struck a 14-year-old boy in the leg, police said.

Gaskill responded to the scene in less than a minute, and confronted Haskill in a hallway three minutes after the shooting, the sheriff ‘s office said.

About 30 seconds later, Rollins and the officer fired simultaneously, the sheriff’s office said.

Willey died after being taken off life support on Thursday, two days after the shooting. The injured boy was discharged from a hospital a day after the shooting.

Great Mills High School is in Great Mills, about 70 miles southeast of Washington.

Police said Rollins, the shooter, had a “prior relationship which recently ended” with Willey and that the shooting was not a random act of violence. The handgun used in the shooting was legally owned by Rollins’ father, police said.