A 17-year-old male from Groveland, Massachusetts, is expected in court Wednesday after allegedly threatening to shoot up his school.
Another teen walked into the police station and alerted officers about the Instagram post.
It showed the suspect and what looked like a firearm, as well as a reference to the first day of school.
The suspect was arrested at his home without incident, and the "gun" in question turned out to be an airsoft pistol, which is considered a firearm in these investigations.
The teen is being held without bail.
Schools will be open on schedule Wednesday.