(CNN) — A man was shot and killed by a police officer outside of an Alabama elementary school Thursday afternoon after an altercation with a school resource officer, Etowah County Sheriff Jonathan Horton said during a news conference.

At least 34 students were inside Walnut Park Elementary School when the man tried to get inside, Gadsden City School Superintendent Tony Reddick tells CNN.

The Alabama Law Enforcement Agency (ALEA) is investigating the incident.

In a news release, ALEA said that the individual was seen trying to make forcible entry into a marked Rainbow City patrol vehicle near the school. A resource officer made contact with the individual and attempted to stop him, the release said.

An altercation ensued in which the individual attempted to take the officer’s firearm. The officer was able to call for backup and a responding officer shot the individual who was pronounced dead at the scene, according to the release.

No children at the school were hurt in the incident, Horton said.

Though the school year is over, during the summer, the school has a literacy camp for elementary students, Reddick said.

The district has always had a practice of locking all exterior and interior doors, Reddick said. Something he touted for helping keep the potential intruder out.

“He tried to open at least two doors leading into the school,” Reddick said.

“This is Gadsden. A small-knit community. You don’t think that something like this is going to happen at your school,” he added.

Praising the work of the school resource officer, Horton also highlighted the work the district has done in light of the shooting in Uvalde, Texas.

“Our schools, especially after … what’s happened in Texas, we have one of the largest school resource officers programs in Etowah County, preaching that these doors stay locked. That the individual was not able to make it inside the school,” he said.

“From the school resource officer’s standpoint — he did exactly what should be done. He went straight to the threat, he confronted it and he dealt with it. It ended in, unfortunately, the death of the suspect, but that’s the safest alternative. To keep that threat out of that school,” he added.

The school resource officer was transported to the hospital to be treated for minor injuries he sustained during the altercation, Horton said.

It is not known if the suspect was armed.

The-CNN-Wire™ & © 2024 Cable News Network, Inc., a Time Warner Company. All rights reserved.

Join our Newsletter for the latest news right to your inbox