Great Mills High School remained on lockdown after the shooting was “contained” when a school resource officer “engaged” the gunman, St. Mary’s County Sheriff Tim Cameron told NBC Washington.
The shooter was injured and taken to the hospital, where he later died, officials said at a news conference. He was not immediately identified.
The chaos unfolded before 8 a.m. ET when the gunman walked into the 1,600-student school and fired a round at a 16-year-old female student, also hitting a 14-year-old male student.
The school resource officer was alerted to the gunfire and “quickly” confronted the gunman, according to Cameron said.
The officer fired “at least a round at the shooter, and I believe the shooter also fired a round,” Cameron said, without detailing how the gunman was injured. The officer was not wounded.
“This is your worst nightmare,” Cameron added.
The female victim was hospitalized and listed in critical condition, according to MedStar St. Mary’s Hospital. The male victim was in “good condition,” the hospital said.
All high schools in St. Mary’s County are staffed with an armed deputy sheriff who works as a school resource officer. Agents with the Bureau of Alcohol, Tobacco, Firearms and Explosives also responded to the scene, which is around 70 miles south of Washington.
Students were taken by bus to a nearby high school to be reunited with panicked parents.
Terrence Rhames, a senior at Great Mills, said he and his friends were talking before class when they heard the pop of a loud gunshot.
“I heard one shot and when we ran, we saw a teacher and he was looking at us with a confused look,” Rhames said. “We were trying to figure out if this is real.”
He said students raced for the exits and called their parents.
“It was just shocking. You hear about shootings — you never think would happen to you,” Rhames said.
Students at Great Mills High School participated in last week’s National School Walkout that honored the 17 victims of the Parkland shooting.
Emma González, a Parkland senior and activist, tweeted to Great Mills students on Tuesday morning that “we are Here for you.”
House Minority Whip Steny Hoyer, D-Md., told NBC Washington that he was “sickened” to hear of another school shooting, this time in his district.
Across the country, “we’ve had 16 school shootings since the beginning of the year, just about one a week,” Hoyer said. “It’s unacceptable. We need to take action.”
The school and college shootings have included several which took place during school hours and resulted in injuries or deaths, but some have also involved unintentional gunfire or occurred when the school was closed.
The White House this month said it will propose funding firearms training for school personnel and bolster firearm background checks, but steered clear of a previous idea floated by President Donald Trump to raise the minimum legal age to buy semiautomatic weapons from 18 to 21.
The state of Maryland prohibits anyone under the age of 21 from having certain firearms, such as handguns or assault weapons.
Article originally appeared on NBCNews.com