ROCKWOOD BOROUGH, Pa. (KDKA) — A 13-year-old boy has been charged with sending threatening messages via social media to a high school is Somerset County.

The boy, from Rockwood Borough, is facing charges of terroristic threats and disorderly conduct.

State police say the alleged threatening messages were posted to Instagram and reported by students to school staff members at Rockwood Area High School.

Investigators say the messages warned other students “not to go to school” on May 23 “because he was going to bring a pistol to school.”

According to police, the boy had been “thinking about doing so for a month” and that he may have been targeting particular classrooms and students.

The school was put on lockdown on May 23, and officers went to the boy’s home where they say he “admitted to writing the concerning messages.” They determined the teen didn’t have access to weapons, and “no longer presented a threat.”

The boy was left in the custody of his mother, and the lockdown was lifted at the school.

The teen is also facing disciplinary action with the school.