A police officer shot a man who officials say was forcefully trying to enter an elementary school in Gadsden, AL, Thursday. The shooting is reported to have happened during a struggle while the man was trying to take the officer’s gun.

The incident happened outside Walnut Park Elementary School where a summer literacy camp for elementary-age children was taking place. The school superintendent says 34 children were in the school at the time of the incident. He reports the man was trying to get into vehicles and “aggressively” tried to open several doors to the school.

A resident called police reporting a suspicious man outside the school and according to the Alabama Law Enforcement Agency the man attempted to enter a marked Rainbow City patrol vehicle used by the school resource officer, reports AL.com.

ALEA reports the man resisted and attempted to take a Rainbow City officer’s firearm and was shot and killed in front of the school. The deceased was identified as Robert Tyler White, 32, of Bunnlevel, N.C.