(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, according to St. Mary's County Sheriff Tim Cameron.
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, 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.
Rollins was later pronounced dead. Gaskill was unharmed. The 16-year-old female student is in critical condition with life-threatening injuries, and the 14-year-old male student who was shot is in stable condition.
Cameron said he was not sure if Gaskill's bullet hit the suspect, but he praised the officer's quick response to the situation.
"He responded exactly as we train our personnel to respond," he said.
It's the 17th school shooting in the United States since January 1.
"This is what we train for, this is what we prepare for, and this is what we pray that we never have to do. On this day, we realized our worst nightmare," Cameron said.
"The notion of 'it can't happen here' is no longer a notion."
The school was on lockdown for a brief time, and students were evacuated from Great Mills High School to a reunification center at a nearby high school, the school system said.
'I'm still a little shaken up'
Jonathan Freese, a student at Great Mills, called CNN from his cell phone during the lockdown in his math class. Police were going through classrooms to clear the school, Freese said.
"I'm still a little shaken up," he said.
Freese said the school had held drills a couple of times for this kind of situation.
"I didn't really expect for this to happen. I do always feel safe, though, because they always have police at the school," he said.
A spokesman for the FBI's Baltimore field office said its agents are on the scene of the incident. Special agents from the ATF's Baltimore office are also at the school, that office tweeted.
Great Mills High School is in Great Mills, Maryland, about 70 miles southeast of Washington, D.C. It has more than 1,500 students, about 56% of them minority students, and its four-year graduation rate is 91%, according to the school's 2015-16 improvement plan.
Al Murray shot video of police responding to the shooting at the high school Tuesday. He says he saw at least one officer run into the building with a shotgun or rifle.
17th school shooting this year
According to CNN's research, there have been 16 confirmed school shootings this year in the United States prior to Tuesday.
Maryland Gov. Larry Hogan said the shooting was a "call to action" to address school safety.
"Although our pain remains fresh and the facts remain uncertain, today's horrible events should not be an excuse to pause our conversation about school safety. Instead, it must serve as a call to action," he said in a statement.
Last week, students at Great Mills High School walked out of class as part of a student-led protest against school violence in the wake of the mass shooting at Marjory Stoneman Douglas High School in Parkland, Florida.
Speaking to reporters, President Donald Trump called the shooting "a terrible thing" on Tuesday.
Several students from Stoneman Douglas tweeted about the Great Mills school shooting on Tuesday, offering their thoughts and calling for an end to gun violence in schools.
"Less than a WEEK ago Great Mills High School students walked out with us to protest gun violence... now they're experiencing it for themselves," said Jaclyn Corin, a student fighting for gun reform. "The state of our country is disgusting - I'm so sorry, Great Mills."
"We are Here for you, students of Great Mills," student activist Emma Gonzalez tweeted. "together we can stop this from ever happening again."
"The words School & Shooting should not be next to each other. Headlines like this should not have to be typed up every week. All of these incidents have one thing in common. My thoughts are with Maryland right now," tweeted student activist Adam Alhanti.