A shooting at a high school in Great Mills, Maryland, on Tuesday left one student dead and two others injured, officials confirmed.A male student opened fire around 8 a.m. in a hallway at Great Mills High School, striking a female student and a male student, St. Mary’s County Sheriff Tim Cameron said during a press conference.A school resource officer, a St. Mary’s County sheriff’s deputy assigned to the school, exchanged fire with the shooter, wounding him and ending the confrontation, Cameron said. The school resource officer was not injured.The three students were transported to local hospitals. The shooter died hours later. The female student remains in critical condition and the male student is in stable condition, according to officials.“The potential for other victims was very real,” Cameron said during the press conference. “You can only theorize what would have happened … if our school resource officer hadn’t engaged immediately.”“This is what we prepare for,” he added. “This is what we pray we never have to do. And on this day, we realize our worst nightmare ― that our greatest asset, our children, were attacked in … a bastion of safety and security. … The notion of it can’t happen here is no longer a notion.Emergency responders are seen on March 20, 2018 at Great Mills High School in Great Mills, Maryland, after a shooting at the school. (JIM WATSON via Getty Images)The school remained on lockdown as law enforcement officials continued to investigate the matter. All students were bused to nearby Leonardtown High School, where their parents were instructed to pick them up. Roughly 1,600 students attend Great Mills High School, which is located about 60 miles southeast of Washington, D.C.Two special agents from the Bureau of Alcohol, Tobacco, Firearms and Explosives were headed to the scene, the agency tweeted. FBI agents were also on the scene to assist the sheriff’s office.“We are closely monitoring the situation at Great Mills High School,” tweeted Maryland Gov. Larry Hogan. “Our prayers are with students, school personnel, and first responders.” There has been a Shooting at Great Mills High School. The school is on lock down the event is contained, the Sheriff’s office is on the scene additional information to follow. Parents/Guardians should go to Leonardtown HS for reunification with GMHS students— SMCPS_MD (@SMCPS_MD) March 20, 2018 Terrence Rhames, a senior at Great Mills High School, told The Baltimore Sun that he was standing with friends outside their class around 8 a.m. when they heard a gunshot. He said he immediately sprinted toward an exit.“I just thank God I’m safe,” Rhames, 18, told the Sun. “I just want to know who did it and who got injured.” The incident occurred days before a student-led march to protest gun violence is set to take place in Washington, D.C., and other major cities nationwide.Great Mills High School students participated Wednesday in the National School Walkout to demand stricter gun laws in the wake of the Feb. 14 mass shooting at Marjory Stoneman Douglas High School in Parkland, Florida, which left 17 people dead. Students @GMHS_SMCPS Great Mills High School joined tens of thousands of students nationwide for the #NationalSchoolWalkout to protest gun violence. @thebaynetcom will have the full story. pic.twitter.com/1TsG0T1EnO— Joy Shrum (@JoyShrumTBN) March 14, 2018 This is a developing story. Check back for updates.(Mark Wilson via Getty Images)Police vehicles are parked in front of Great Mills High School after a shooting on March 20, 2018 in Great Mills, Maryland. (Mark Wilson via Getty Images)Police vehicles pull out of Great Mills High School.(JIM WATSON via Getty Images)School buses are seen near the school. (JIM WATSON via Getty Images)A man looks out of a school bus. (JIM WATSON via Getty Images)A sheriff’s car is seen near the school. (JIM WATSON via Getty Images)Emergency responders at the school. (JIM WATSON via Getty Images)School buses and security on school property. (JIM WATSON via Getty Images)School buses, security and state troopers at the scene.(Mark Wilson via Getty Images)A gate is locked in front of Great Mills High School. This article originally appeared on HuffPost.