A Frewsburg, New York, man is facing charges in connection to the lockout at Hinsdale Central School on Thursday.
Police say 20-year-old Nicholas McChesney sent a text message to a 17-year-old student suggesting he would harm others with a gun and that the school should be locked.
The student reported the threat to the administration, which put the school on lockout.
When police contacted McChesney he acknowledged that he was have mental health problems and agreed to being evaluated at a hospital. He was taken into custody in Salamanca.
Troopers say further investigation showed that the 17-year-old had an order of protection against McChesney that he had already violated in March. Further investigation showed that he had no access to guns.