What state police called "a misunderstanding in this little chat room" prompted an investigation into a potential threat on social media and ended up closing schools in a Montgomery County district on Monday.

Classes for the 3,380 students in the Upper Perkiomen School District were canceled while authorities investigated a threatening post on Instagram, the district said.

That threat was deemed not credible, and classes will resume Tuesday, officials said.

State Trooper Deanny E. Wright said no charges would be brought against the source of the perceived threat, a 15-year-old boy who attends Upper Perkiomen High School.

"It was a miscommunication, a misunderstanding in this little chat room," the trooper said. He said 70 people were in the chat room and compared the boy's comments to someone "posting something about hating your workplace and someone thinks you're going to shoot up the place."

Police said the preliminary investigation found that the social media posting that prompted the closing contained screen shots from a video meant to curtail gun violence and identify warning signs of potential violence. That video was originally posted by sandhookpromise.org, an anti-gun-violence nonprofit founded by families of victims of the 2012 massacre at Sandy Hook Elementary School.

"We need to work together, as a community, to create a safe and supportive learning environment," Superintendent Alexis McGloin wrote in the message on the district's website.

"We ask that you please discuss the day's events with your child, emphasizing the seriousness of this situation and the impact their online interactions can have on themselves, their friends, family and community."

ebabay@phillynews.com 215-854-2153 @emilybabay