Two students were injured and a third, the gunman, has died in a shooting in a hallway at Great Mills High School in Southern Maryland on Tuesday morning, according to the St. Mary's County Sheriff's Office.

A school resource officer shot the student gunman, who fired back with a handgun, Sheriff Tim Cameron said. The school resource officer was not injured, Cameron said.

"He pursued the shooter and engaged the shooter," Cameron said of the school resource officer, whose identity has not been released.

The two students who were injured _ a 14-year-old boy and a 16-year-old girl _ were being treated at local hospitals, officials said. Neither their identities, nor the shooter's, were released Tuesday morning.

The boy is in good condition and is being treated at MedStar St. Mary's Hospital. The girl was initially brought to MedStar, but was later stabilized and transferred to University of Maryland Prince George's Hospital Center.

The shooting happened just before 8 a.m. at the school at 21130 Great Mills Road, county spokesman Tony Jones said from the emergency operations center.

The St. Mary's County school was on lockdown and students were being evacuated, Jones said.

Cameron said multiple law enforcement agencies and fire departments assisted in the "mass response" at the school.

"This is what we train for. This is what we prepare for and this is what we pray we never have to to," Cameron said. "And on this day we realized our worst nightmare that our greatest asset — our children — were attacked in a bastion of safety and security, one of our schools."

Parents are being asked to meet their children at a reunification site at Forrest Career Technical Center in Leonardtown. Details about any injuries or the person who fired shots was not immediately available.

"There has been an incident at Great Mills High School," the department tweeted. "Parents please DO NOT respond to the school."

Senior Terrence Rhames was standing with his friends outside their first-period class around 8 a.m. when he heard a shot. He said he knew instantly what the loud crack meant.

He started running, heading to a first-floor bathroom before thinking to himself, "This is a dead end." He turned to instead sprint toward the nearest exit. Out of the corner of his eye, Rhames said, he saw a girl fall.

"I just thank god I'm safe," said Rhames, 18. "I just want to know who did it and who got injured."

Great Mills, which enrolls about 1,600 students, is about 90 miles outside of Baltimore.

St. Mary's Ryken High School, a private school about 15 minutes northwest of Great Mills, went into lockdown around 9 a.m., according to Brad Chamberlain, dean of academics.

"We're getting conflicting reports," Chamberlain said.

U.S. Rep. Steny Hoyer, a Democrat who represents Southern Maryland, said his first reaction to hearing of a school shooting in his district was "a deep sense of loss." As a father, grandfather and great-grandfather, Hoyer said it's important to keep children safe in schools.

The incident comes just over a month after a deadly rampage in a Florida high school. Seventeen people died in the Marjory Stoneman Douglas High School shooting, catalyzing a national conversation about gun violence in schools.

Last Wednesday, Great Mills students participated in a nationwide "school walkout" on the one-month anniversary of the Parkland shooting. The students called for an end to gun violence and more school safety measures, according to local news reports.

One of the student activists from Marjory Stoneman Douglas tweeted her anger about the Great Mills incident.

"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," Jaclyn Corin wrote. "The state of our country is disgusting _ I'm so sorry, Great Mills."

This weekend, thousands of students are expected to flood Washington for the "March for Our Lives," a national protest to demand an end to mass shooting in schools.

Gov. Larry Hogan said he was "closely monitoring" the situation at Great Mills, and is on his way to the scene. Sen. Ben Cardin is also en route.

Maryland State Police "is in touch with local law enforcement and ready to provide support. Our prayers are with students, school personnel, and first responders," Hogan tweeted.

Maryland State Police troopers, agents from the Bureau of Alcohol, Tobacco, Firearms and Explosive's Hyattsville offices, and FBI agents are also assisting.

Less than a month ago, after the Parkland shooting, Hogan proposed spending $125 million next year to enhance security at schools in the state, including by reinforcing doors and installing panic buttons to prevent and react to shooters.

He also suggested $55 million for two ongoing spending initiatives, including $50 million for "school safety grants" that could pay for armed school resource officers, technology and counselors at public schools, and increased funding for the state's Center for School Safety, which would include money to hire social media experts to scour the internet looking for threats.

The proposals are currently being considered by lawmakers in Annapolis, who have already given initial approval to three tougher gun-control laws.

Sen. Steve Waugh, a Republican who represents St. Mary's County, said his Annapolis office had become a clearinghouse for information in the hours after the incident.

Waugh, with the support of the Senate's Democratic leadership, recently introduced a package of four bills dealing with school security. He said he's sure Tuesday's shooting will focus attention on it.

"It certainly adds urgency to it," Waugh said. "I'm just grateful we have a vehicle for us to begin the decision."

Waugh said the legislation is a bipartisan effort and that Senate President Thomas V. Mike Miller is a co-sponsor of the four bills. Waugh said the number of co-sponsors is growing.

"We have a bipartisan consensus that things need to be done," he said.

The Maryland House of Delegates opened their session Tuesday with a moment of silence for the shooting victims in St. Mary's County.

Education secretary Betsy DeVos called the incident at Great Mills a "horrifying situation," and said her agency stands ready to help.

"Our hearts and prayers are with those impacted, and our deep appreciation goes out to the first responders," she wrote on Twitter.

Since the Parkland shooting, many districts around the country have seen an spike in threats made against schools. In late February, local media reported that police were investigating a social media threat against Great Mills, warning of an upcoming school shooting.

Police increased their presence at the high school, according to TheBayNet.com, though the threat was no substantiated. There has been no indication that Tuesday's incident is related.