(File image)

Alliston's Banting Memorial high school was in lockdown for almost two hours Tuesday, after police received reports of two students with a gun.

Police took two males into custody shortly after 2:30 p.m. and said they found an airsoft gun resembling a .357 handgun on one of the males being investigated.

Officers say the airsoft gun is capable of firing a metal pellet, similar to a pellet gun and could cause personal injury.

Police say witnesses described watching the suspect threaten another student with the replica weapon and conceal it in a backpack. That's when the vice principal was notified, and the lockdown was initiated.

Students were told to stay away from the windows and doors during the lockdown as concerned parents lined the sidewalks outside the building, waiting anxiously for word on the situation.

One student who spoke with CTV News said they were all sitting on the floor at the back of their classroom, "with the door locked and closed. No one from the hall can see in."

The principal at Banting Memorial sent an email to parents shortly after the incident occurred, it reads in part, "I want you to know that we will always take whatever precautions are necessary to keep our students and staff safe. I’m proud of the way our students dealt with the situation today, and I thank our local police for their support."

The two students were released into their parent's custody.

Police say charges are pending as the investigation continues.