(CNN)A 17-year-old male student shot two other students at Great Mills High School in Maryland on Tuesday morning before a school resource officer engaged him and stopped the threat, authorities said. The incident began in a school hallway at 7:55 a.m., just before classes started. Authorities say Austin Wyatt Rollins, armed with a handgun, shot a female and a male student. The shooter had a prior relationship with the female student, St. Mary’s County Sheriff Tim Cameron said. School resource officer Blaine Gaskill responded to the scene in less than a minute, the sheriff said. Gaskill fired a round at the shooter, and the shooter fired a round simultaneously, Cameron said.