Albion, New York, police Friday arrested three middle school students in an alleged plot to attack Albion Middle School with guns and explosives.

The students allegedly planned to enter the school armed with guns and explosives with the intent to kill or injure as many students and staff as possible. Police reportedly seized several “legally” purchased weapons.

Police said the three would be charged as juveniles with second-degree conspiracy. 

Albion police began investigating the possible threat after a tip from a staff member. The investigation reportedly uncovered messages on messenger app Discord. The students who indicated they felt “shunned,” detailed how they would carry out the attack and set a date.

Albion Central School District Superintendent Michael Bonnewell sent a letter to parents Wednesday, saying police and the school district were investigating the possible threat.

“The district had previously formalized a Threat Assessment Team with assistance from members of the Albion Police Department, the Orleans County Mental Health Department, the Orleans County District Attorney's Office, and a specialist from the FBI to review potential threats to our students,” Bonnewell wrote.

“The state of New York has zero tolerance for violence in our schools,” New York Gov. Andrew Cuomo wrote in a statement. “I will do everything in my power as governor to keep our children and our teachers safe. And I want to be crystal clear: any person posing a threat to our schools will face the harshest possible penalty under the law -- whether or not they intend to actually execute that threat.”

Los Angeles Police In this representational image, an LAPD officer looks at a car in Los Angeles, April 10, 2017. Photo: David McNew/Getty Images