PLUMSTED — A student at New Egypt High School had planned to shoot his fellow classmates at their graduation and was looking to buy the weapon to carry out the killing spree, according to the Ocean County Prosecutor's Office.

Matthew Vanderbeek, 19, was arrested on Tuesday and was being held in jail on Thursday before his first court appearance.

Investigators say Vanderbeek had made his intentions to shoot students and staff at the ceremony known on his social media accounts. A search warrant was executed at his home "to check for weapons, additional evidence of the crime and to attempt to seize any communications made via phone or computer," the prosecutor's office said.

In addition to the online threats, Vanderbeek had also attempted to buy a gun, according to the prosecutor's office. No information was provided about what steps he had taken to buy a weapon.

The Ocean County Prosecutor's Office said Thursday there was "no present threat to the Plumsted Township School system or the graduation ceremony."

Plumsted schools Superintendent Gerald North posted a letter on the district's Twitter page about what he called a "possible threat to the graduation ceremony." North said Thursday's graduation will continue as scheduled, and will be held outdoors weather permitting. He added that there will be "an increased police presence" at the ceremony.

"We, as always, have the safety and security of our students first and foremost in our decision making," North said. "Please understand this situation was dealt with promptly and professionally to insure the safety at, as well as the memories from the graduation of the Class of 2018."

Vanderbeek has been charged with third-degree making terrorist threats with a threat to kill and second-degree attempting to possess a firearm for an unlawful purpose.

Sign up for the Cat Country 107.3 Newsletter

Get the best of Cat Country delivered to your inbox every week.