NORTH ADAMS — A student at the Massachusetts College of Liberal Arts has been arrested and banned from campus after police say he made threats on social media targeting residence halls, prompting a brief lockdown.

But the student said the remarks were an attempt at “dark humor,” court documents show.

Joseph Caso, 18, of Selden, N.Y., sent a message in a group forum on Snapchat whose recipients included over 50 students in MCLA’s freshman class, police said. The message read, “mcla really need to pu with a gun squad to half y’all dorms and just spray too many weirds.”

Caso also shared on Snapchat a screenshot of a text message that he had sent to his friend in New York that read: “Pull to mass w the grip please, I need you to do something, people weird.” Campus police contacted his friend who said he had no intention of traveling to MCLA to carry out the events described, according to a police report.

Students reported Caso’s messages to a residential adviser at Berkshire Towers, where Caso was living, and the police were called. Campus officers who responded shortly after midnight Monday did not immediately find Caso in his room at Berkshire Towers, prompting officials to issue a campus-wide lockdown and shelter-in-place order that lasted about 40 minutes.

Three off-duty campus officers were called to assist, a report states. Officials did not find any weapons in the room Caso shared.

Students informed officers that Snapchat’s geolocation function showed that Caso was still inside the Berkshire Towers at 330 Church St., according to a report. Officers encountered Caso as he stepped off an elevator inside the dormitory building, and took him into custody. He agreed to speak with police after being read his Miranda warnings, police said.

Under questioning, Caso admitted to sending the messages but claimed it was an attempt at “dark humor,” and he never planned to carry out any attack, police said. Caso complained about things other students did that aggravated him, according to the report, including pushing all of the buttons in an elevator and leaving apples in elevators.

“Caso stated that his actions were all an attempt a[t] bad ‘Dark’ Humor,” wrote Sgt. Mark Denault. “He told me that at no time did he intend on any actions toward the threat.”

Police described Caso as cooperative with authorities.

Court documents that included police reports and written statements from students detailed the fear and anxiety that spread among some members of the MCLA community as a result of Caso’s messages.

“Everyone was very nervous, people leaving the school to go home. I hadn’t been this overwhelmed in a while,” one student said in a handwritten statement.

The student said the incident started over “an argument about laundry, which proceeded into people being upset.”

Another student in a separate witness statement said they had been in a school shooting at a previous institution and took seriously the statements made by Caso, who the student said had expressed anger toward his peers prior to sending the messages.

Caso pleaded not guilty in Northern Berkshire District Court on Monday to a felony charge of bomb/hijack threats causing serious public alarm and a misdemeanor charge of disorderly conduct, according to court documents.

His defense attorney, Michelle Mechta, did not immediately respond to a request for comment left on her voicemail at the Committee for Public Counsel Services.

Caso does not have a criminal record, court documents show. The Berkshire District Attorney’s Office did not seek bail, and Caso was released on personal recognizance with a GPS and orders to stay away from the MCLA campus, according to the court clerk’s office.

Dean of Students Heather Quire informed Caso in a letter on Monday that she had placed him on an interim suspension, banning him from campus grounds and from participating in remote classes.

Amanda Burke can be reached at aburke@berkshireeagle.com or 413-496-6296.

Amanda Burke covers Pittsfield City Hall for The Berkshire Eagle. An Ithaca, New York native, she previously worked at The Herald News of Fall River and the Fitchburg Sentinel & Enterprise.