California police have arrested a 17-year-old who allegedly threatened a school shooting on social media.
The teen, a student at Heritage High School in Menifee, California, about 75 miles east of Los Angeles, allegedly sent messages on social media that he planned to shoot "up a school" and "kids," according to a statement from the Menifee Police Department.
The threats did not mention a specific school, police said.
In addition to the threats of violence, the teen had allegedly been harassing students and was in possession of a "ghost gun," a privately manufactured firearm that is untraceable, police said. Ghost guns are typically created by assembling pieces, either sold together in a kit or separately, to create a fully functioning firearm.
The kits can often be purchased without a background check and do no have serial numbers, making them accessible to people who are legally prohibited from purchasing firearms, including minors, according to the police department.
Detectives who obtained a search warrant for the teen's home encountered him as he was returning home just before 2 p.m. Sunday and found the firearm, according to the police statement. Investigators are trying to determine how the teen got the gun.
The suspect, who was not named, was booked into the Riverside County Juvenile Hall on several charges, including making criminal threats, possession of brass knuckles and possession of an unregistered firearm.
The Perris Union School District was immediately notified and assisted detectives in the investigation, police said.
"All threats, whether specific, implied or otherwise, that cause fear in our community will not be tolerated," the police department said in a statement. "MPD is committed to using all available resources to ensure we hold the person(s) responsible for such threats accountable for their actions. These threats are disruptive to our school sites and require many hours of law enforcement investigation."
The school district did not immediately respond to ABC News' request for comment.
ABC News' Alyssa Pone and Jennifer Watts contributed to this report.