Neither Cranford Police nor Orange Avenue School officials have detailed the nature of the alleged threat toward the school.

The affidavit of probable cause in the case, obtained Thursday, alleges Acosta "appeared to have a tough time adjusting to being a Special Education Teacher" and was angry at two other teachers who he worked with in the classroom.

"Matthew was adamant that his co-teachers were out to get him and he should just bring a gun to school and shoot up the place," detectives wrote in the affidavit.

Acosta also stated that he had guns, the affidavit says.

When he said that in a conversation with a school employee, they asked if he was joking. Acosta replied, "not you, well, where are you during what period?" The co-worker asked Acosta again if he was just making a joke and he said "yeah, yeah."

A close family friend who spoke with NJ Advance Media this week, with the condition of anonymity, said the situation must have arisen out of some sort of miscommunication. (NJ Advance Media talked to the friend before obtaining the affidavit.)

"(Acosta) is not a violent person," the friend said. "It just doesn't make sense."

Superintendent Scott Rubin has said a staff member reported the threat to the school's principal, who then contacted police.

In an email to families in the district, Rubin called the incident "extremely unsettling," but added that there was no current threat to the school.