Police say a 19-year-old man posted pictures of guns and a threatening message directed at a Florida Keys high school on a social media site.
Duviel Gonzalez was arrested over the weekend. He faces charges of written threats to kill or do bodily harm and marijuana possession.
Monroe County Sheriff's Office officials said Gonzalez posted pictures and a message threatening Marathon High School on his Instagram page.
Authorities were notified of the posts by numerous concerned citizens Saturday morning.
Sheriff's detectives, working alongside federal agents and the state attorney's office, were able to locate Gonzalez using the IP address provided by Instagram's parent company, Facebook.
When interviewed by detectives, Gonzalez told them he did it as a joke, officials said.
Sheriff Rick Ramsay said there is no remaining active threat to the community.
"I couldn't be happier with how our community came together in response to those disturbing posts on social media," Ramsay said.
"I'm particularly proud of our young people, who were quick to alert adults. We were able to make a timely arrest in this case as a result of help from our fellow citizens, the hard work on behalf of the sheriff's office and our partners at other law enforcement agencies."