A gunman who opened fire at Great Mills High School in Maryland was killed Tuesday after engaging an armed school resource officer, authorities said.

Blaine Gaskill

Deputy Blaine Gaskill, the school resource officer, engaged the gunman.  (SMCSO)

The shooter, Austin Wyatt Rollins, 17, was the only fatality. Police said Rollins used a handgun to shoot a 16-year-old female student who is in the ICU with life-threatening, critical injuries. A 14-year-old male student was also shot and is in stable condition.

St. Mary’s County Sheriff Tim Cameron said there were indications Rollins and the female victim had a prior relationship, which police are investigating as a possible motive for the incident.

The school resource officer, Deputy Blaine Gaskill, was alerted of the shooting, immediately responded and engaged the shooter. Gaskill, who is also a SWAT team member, was not injured in the shooting.

gmhs5

A shooting was reported Tuesday morning at Great Mills High School in Maryland.  (GMHS)

“Our school resource officer was alerted to the event. He pursued the shooter, engaged the shooter, fired a round at the shooter,” Cameron said. “The shooter fired a round as well. In the hours and days to come, we’ll be able to determine if our school resource officer’s round struck the shooter.”

Cameron said police were investigating if the shots fired killed Rollins or if he attempted to commit suicide. Police are also investigating if the 14-year-old male student was shot by Rollins or Gaskill while the two exchanged gunfire.

Maryland Gov. Larry Hogan called the shooting “tragic” and accused the Democrat-led legislature of failing to take action on “one of the aggressive school safety plans in the country.”

“We need more than prayers, we gotta take action,” Hogan said. “We got one of the most aggressive school safety plans in America that we introduced a few years ago. “We’ve got to take action. We’re going to try to get something done in Annapolis.”

Cameron said the entire incident played out in about a minute and Gaskill did everything he was supposed to do in an active shooting situation. Police are currently reviewing surveillance video from the school to determine the exact timeline of the incident.

A mother walks her daughter, a student from Great Mills High School, to the car as she picks her up from Leonardtown High School in Leonardtown, Md., Tuesday, March 20, 2018. A teenager wounded a girl and a boy inside his Maryland high school Tuesday before a school resource officer was able to intervene, and each of them fired one more round as the shooter was fatally wounded, a sheriff said. St. Mary's County Sheriff Tim Cameron said the student with the handgun was declared dead at a hospital, and the other two students were in critical condition. (AP Photo/Carolyn Kaster)

A mother comforts her daughter after a school shooting at Great Mills High School on Tuesday, March 20, 2018.  (AP)

Cameron said officials were looking into Rollins’ phone, social media and room but have not yet found any warning signs the shooting was imminent.

Earlier, the school was placed on lockdown and students were evacuated to Leonardtown High School to be reunified with their parents.

The Maryland State Police along with the FBI and agents from the Bureau of Alcohol, Tobacco and Firearms are on the scene assisting with the investigation. The scene at the school which has about 1,600 students and is near the Patuxent River Naval Air Station was said to be “contained.”

President Trump was notified of the shooting, press secretary Sarah Sanders told Fox News.

Ziyanna Williams, a student at the school, said her fellow students were cowered in classrooms as police came inside the room to evacuate the building.

Teachers and school employees depart Great Mills High School, the scene of a shooting, Tuesday, March 20, 2018 in Great Mills, Md. A teenager wounded a girl and a boy inside his Maryland high school Tuesday before an armed school resource officer was able to intervene, and each of them fired one more round as the shooter was fatally wounded, a sheriff said. St. Mary's County Sheriff Tim Cameron said the student with the handgun was declared dead at a hospital, and the other two students were in critical condition. He said the officer was not harmed. (AP Photo/Alex Brandon)

Students leave the scene of an incident at Great Mills High School on Tuesday, March 20, 2018.  (AP)

“They came in with guns, and they probably thought there might be another shooter, of course,” she said. “About an hour or two later they came — more police came — and told us they would search us and search our bags and stuff.” Eventually, the students were escorted outside.

Terrence Rhames, 18, a student at the school, told the Baltimore Sun he was standing with friends before class began when he heard a gunshot. He said he started to run and believed he saw a girl fall nearby.

“I just thank God I’m safe,” Rhames said. “I just want to know who did it and who got injured.”

Just last month, the school’s principal, Jake Heibel, told parents in a letter posted on the local news site The Bay Net that two students were interviewed after they were overheard mentioning a school shooting, and they were found to pose no threat. Heibel said the school increased its security nevertheless after social media posts about a possible school shooting “circulated quite extensively.”

Also last month, the St. Mary’s County Sheriff’s office said it arrested two teenage boys for “Threats of Mass Violence” and a 39-year-old man on related charges after the teens made threats about a potential school shooting at Leonardtown High School, a high school about 10 miles from Great Mills. Police said they obtained a search warrant that led to them finding semi-automatic rifles, handguns and other weapons, along with ammunition.

The school is located about 60 miles from Washington, D.C. The St. Mary’s County Public Schools tweeted counselors and support staff would be on hand at Leonardtown High School.

The incident comes more than a month after the school shooting at Marjory Stoneman Douglas High School in Parkland, Fla. That massacre, carried out by a former student, left 17 people dead. The shooting also comes days before some 500,000 people were expected to march Saturday in Washington, D.C. to protest gun violence and push for gun control legislation.

The Associated Press contributed to this report.