A man who was trying to enter an Alabama primary school where a summer program was being held has been shot dead by a police officer, authorities say.
Gadsden City Schools Superintendent Tony Reddick told reporters that a "potential intruder" went to several doors trying to get into Walnut Park Elementary School, where a summer literacy program was being conducted for 34 children.
All the exterior doors were locked, he said, and the principal sought help when she realised what was happening.
A police officer from nearby Rainbow City was working as a school resource officer and encountered a man who attempted to break into a marked Rainbow City police car near the school, according to a statement from the Alabama Law Enforcement Agency.
More officers from the Gadsden Police Department showed up to assist, the statement said. .
At least one other officer responded and the person was shot to death after resisting and trying to take the resource officer's gun, a statement from the agency said.
The statement, which did not mention any attempt to enter the school, did not say how many shots were fired or by whom.
The state identified the dead man as Robert Tyler White, 32, of Bunnlevel, North Carolina.
Officials do not know whether the man was a "passerby" or something else, Reddick said.
Authorities did not immediately release details including whether White was armed or why he might have been trying to get into the school or patrol car.
While the resource officer suffered minor injuries, no students were hurt and most did not realise anything unusual had happened, Reddick said.
"Our primary concern was just making sure that someone who wasn't authorised to be in our building does not enter and our kids are safe," he said.
Alabama Governor Kay Ivey sent a tweet saying school police "immediately took action, faculty inside the building followed safety protocols and all children present were kept out of harm's way".
"I commend all involved for acting quickly to protect these children," it said.
Gadsden is about 100 kilometres northeast of Birmingham.