A 17-year-old gunman is dead following an exchange with an armed School Resource Officer (SRO) at Great Mills High School in Maryland on Tuesday morning. Two students were injured.

The gunman opened fire on a 16-year-old female student before class in a central hallway, hitting a male classmate, before the (SRO) exchanged fire with the shooter who was armed with a handgun, disabling him and ending the incident. The SRO was not injured in the exchange which began at 7:45 a.m.

St. Mary Co. Sheriff Tim Cameron on shooting at Great Mills HS: shooting happened in hallway; shooter, a student, fired at a female student, another was student hit. Armed school resource ofc, a deputy, exchanged shots w/ shooter; shooter & female student in critical condition — Peggy Fox (@PeggyTV) March 20, 2018

The female student is in critical but stable condition at a trauma facility, while her male classmate is in stable condition. They were taken to separate hospitals in D.C. where the shooter died at 10:41 a.m.

St. Mary’s Co. Sheriff: 3 students injured at Great Mills HS have been taken to hospitals in DC, Prince George’s County & St. Mary’s Co. Shooter & female student in critical, another student taken to MedSTAR is critical but stable. SRO who stopped shooter was not hurt. @wusa9 — Peggy Fox (@PeggyTV) March 20, 2018

WATCH: Officials give update on school shooting at a high school in Maryland https://t.co/n77utODxMu pic.twitter.com/kMNfqFDZKE — CBS News (@CBSNews) March 20, 2018

Video shows police officers responding to reports of an armed gunman at a Panera Bread across the street from Princeton University’s campus. pic.twitter.com/6R5MvjZXYL — Josh Caplan (@joshdcaplan) March 20, 2018

The ATF and FBI are investigating the incident which came just days after threats were made on Snapchat against the school. The sheriff's department reportedly investigated the threat but did not determine it to be authentic.

Agents from the FBI in southern MD are on scene assisting @firstsheriff at Great Mills High School in Saint Mary's County. Evidence Response Team is on standby. — FBI Baltimore (@FBIBaltimore) March 20, 2018

"This is what we train for, this is what we prepare for," said Sheriff Tim Cameron.

Quick thinking student Jonathan Freese called CNN from his cell phone during lockdown in math class, telling the network "I'm still a little shaken up."

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. -CNN

School busses were used to transport students to a neighboring school to be reunited with their parents.

The shooting comes a week after Great Mills High School students staged a walk-out to protest gun violence in the wake of the February 14 school shooting in Parkland, Florida which was not stopped by the school's resource officer, Scot Peterson.

President Trump has repeatedly called for arming teachers following the Parkland incident as a means to safeguard students against future mass shootings.