Authorities locked down a western Nebraska school after a student produced what looked like a deadly firearm from his backpack.

The Lincoln County Sheriff's Office said in a release that the boy pulled out the weapon outside the Hershey Public Schools building in Hershey on Wednesday, after most of the students had left for the day. The school was placed in lockdown.

The gun turned out to be an airsoft pellet gun that the sheriff's office described as "a realistic replica of a pistol."

Deputies soon found and apprehended the boy and several students with him. Authorities have not released their names and ages. District Superintendent Jane Davis would say only that the boy is an elementary student.

It's not yet clear whether any of the students will face charges.