vmargineanu/iStock(ALBION, N.Y.) — An alleged plan by three students to attack an upstate New York middle school has been foiled, according to New York Gov. Andrew Cuomo.

The alleged threat was at Albion Middle School in Albion, New York, located about 35 miles west of Rochester.

The threat was reported to a middle school staff member late Monday afternoon, according to Albion police. Three students, who communicated through the messaging app Discord, were had set a date to attack at the school, killing or injuring students with explosives and guns, said police.

Police described the threat as credible but not imminent. Authorities did not disclose the date the students had allegedly set.

The three students, all of whom are under 16 years old, are charged with conspiracy in the second degree, said police.

While there was no specific motive, the plot was initiated after one student was upset over being “shunned” by a classmate, said Orleans County District Attorney Joseph Cardone.

No specific students were targeted, Cardone said.

Several “legally possessed” firearms have been seized, according to police.

The students involved “have been removed from school pending the completion of the investigation and disciplinary and other corrective action to ensure the safety of our students,” Albion Central School District Superintendent Michael Bonnewell said in a Wednesday letter.

The superintendent described reports of middle school students sharing “inappropriate and threatening messages and images” through Discord.

Cuomo warned that “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.”

“School and police officials across this state continue to be on high alert and I encourage anyone who notices any unusual or suspicious behavior to report it to school administrators and law enforcement right away,” Cuomo said.

Copyright © 2019, ABC Audio. All rights reserved.