Police say they located the 15-year-old as he was walking to school before classes started.
A South Portland high school student was arrested Thursday after fellow students told authorities he had been making threats on social media.
The student was taken into custody before school Thursday morning on charges of terrorizing and carrying a concealed weapon.
The student was apologetic and said it was "stupid", the police department said.
Elyria detectives learned of the student's Snapchat post when a concerned parent called the police department about 1 a.m. Thursday.
The post included a picture of the student with the words "no school tomorrow" written across it. Playing in the background was the lyrics of a song in Spanish.
"Other students who saw this did the right thing - if you see something then say something - and the student involved was apprehended this morning before entering school", Superintendent Ken Kunin wrote in a letter to students and parents.
An Elyria high school student was not charged after uploading what was believed to be a threatening post to his Snapchat account.
The student's name was not released.
The case will be referred to the Maine Juvenile Community Corrections Office for resolution.