The boy, who is a student at Philip Barbour High School in Philippi, West Virginia, took 29 students and a teacher hostage on Tuesday and held them at gunpoint for an hour before he agreed to negotiations, let them go and surrendered to police.
The teacher held hostage reportedly blocked students from entering her classroom while a fellow teacher alerted authorities to stop the boy from becoming the gunman of a mass school shooting.
At approximately 1.15pm, the boy, who has not been identified, walked into the second floor classroom and pointed a pistol at the teacher, Superintendent Jeffrey Woofter wrote in a prepared statement released by The Exponent Telegram.
Woofter said that the students who were to told not to enter went across the hall to another classroom and told a second teacher they had been sent her way.
The teacher went to the first classroom to see what was happening, and when she opened the door, the boy pointed the gun at her.
She slammed the door shut and returned to her room where she called the main office, who called 911 at approximately 1.30pm.
An assistant principal put the school on lockdown and went classroom to classroom ensuring doors were closed and locked.
When state police arrived, they took positions outside the classroom and negotiators persuaded the boy release the hostages, put the gun down and surrender, Woofter said.
Students who had been held hostage were taken to the gym and met by EMTs and law enforcement officers.
'We want to thank both of the teachers involved and the students in the room for their heroic actions,' Woofter said. 'We also want to thank the entire administration, faculty, staff and student body at Philip Barbour High School for their actions in a very trying situation.'
Students elsewhere in the school were moved to a nearby football field, accounted for and sent home by school bus.
The suspect has been taken to a hospital for evaluation before being taken into custody by police. He has since been placed in a secure detention facility.
The boy was taken before Circuit Court Judge Alan D Moats at 6.55pm for an emergency preliminary hearing and will remain in holding pending confidential proceeding, Barbour County Prosecutor Leckta Poling said.
State Police Capt. Dave Reider said that the investigation into the incident is still ongoing and that he couldn't reveal if shots had been fired.
'Kids will just need to have the opportunity to process this trauma in a way that feels right for them,' Chris Schimmel, head of the West Virginia University school counseling program, told The Exponent Telegram. 'Some kids might need to talk and process, and other kids might need the structure of going to class.'
Steve Saltis was among several anxious parents who went to the school and waited outside an area cordoned off by police tape while waiting for students to be released.
Saltis said by phone that his daughter attends the school and that 'a lot' was going through his mind while he waited for her to head home.
Saltis said many students had been sitting in the school's football stadium after the school was evacuated and that he was able to talk to his daughter.
But Saltis said law enforcement officials told parents nothing while the suspect was still in the school.
Poling wouldn't specify what charges would be brought against the male student.
She said no charges had been filed as of Tuesday night but that the county is pursuing charges.
Poling said that because the case involves a juvenile, the court process would be closed. Police haven't identified the student.
Classmates of the gunman took to Twitter to speak about their emotions surrounding Tuesday's incident.
Some students and Twitter users wrote about how thankful they were that the situation was not worse. Others questioned the boy's actions and the reasoning behind those defending him on social media.