BALTIMORE (WJZ) — A school resource officer is credited with bringing a shooting at a Maryland high school to an end Tuesday morning.

St. Mary’s County Sheriff Tim Cameron has identified the officer as Deputy First Class Blaine Gaskill, a six-year veteran in his first year working at the school, Great Mills High School.

READ MORE: Investigation Underway Following Fatal Car Fire In Baltimore City

RELATED: Md. School Shooting: Shooter Dead At Great Mills High School, 2 Others Injured

Cameron says it was around 7:55 a.m., just before classes were set to begin, when 17-year-old Austin Wyatt Rollins used a Glock semiautomatic handgun to shoot a 16-year-old girl, who he had a prior relationship with, and a 14-year-old boy in the hallway.

Gaskill “was alerted and immediately responded and engaged the shooter,” according to Cameron. Gaskill and Rollins fired shots “almost simultaneously,” Cameron says.

It is not yet known if Gaskill’s shot was the one that hit Rollins.

READ MORE: COVID-19 In Maryland: More Than 700 New Cases & 10 Deaths Reported Sunday

“In the hours to come, in the days to come, through a detailed investigation, we will be able to determine if our SRO’s round struck the shooter,” according to Cameron.

RELATED: Parents Frantically Race To Md. High School Following Shooting

Still, Cameron praised Gaskill for containing the situation in less than a minute.

“He had to cover significant ground,” Cameron said. “The premise is simple: You go to the sound of gunfire.”

It is not yet known how Rollins obtained the gun.

MORE NEWS: Walk To End Alzheimer's Saturday In Cockeysville Aims to Raise Awareness

Follow @CBSBaltimore on Twitter and like WJZ-TV | CBS Baltimore on Facebook