There was a close call Wednesday at Poughkeepsie High School after a student tried to enter the school with a gun. The 16-year-old boy tried to enter the main entrance of the school, where he set off the metal detector. He was stopped by security.

After another failed attempt to enter the school through the metal detectors, the student left the area. He went to a back door to the door and was observed by security hiding something under the door.

Additional security officers were alerted, and they found a .22 caliber handgun wrapped in a hooded sweatshirt.

The student went to City of Poughkeepsie Police Headquarters later with his father, where he was taken into custody and charged. He was charged with criminal possession of a weapon in the second-degree. He is being held pending his arraignment.

The student never made it into the school with the gun, due to excellent work from the security staff at the school who prevented what could have been a terrible situation.