Classmates of the suspect thwarted the alleged bombing attempt Monday at Pine View High School in St. George, Utah, when they spotted smoke coming from the backpack and alerted a school resource officer, according to the Washington County Sheriff's Office.
The school was immediately evacuated and the Washington County bomb squad was called to detonate the device, officials said.
"They confirmed this absolutely was an explosive device and had it detonated it could have caused severe injury, potentially death and damage," Officer Lona Trombley, spokeswoman for the St. George Police Department, told ABC News today.
The device was left in the cafeteria around lunchtime Monday and there were numerous students near it, she added.
"He had attempted to light the fuse so the bomb would explode," Trombley said of the suspect.
Investigators searched the suspect's house in Hurricane, Utah, and allegedly found materials consistent with manufacturing a homemade explosive, officials said. They also allegedly uncovered evidence that the juvenile male, whose name has not been released, had researched information about ISIS and expressed interest in promoting the terrorist group.
The teenager arrested in the incident is also suspected of vandalizing Hurricane High School Feb. 15, police in that nearby town said.
In the vandalism incident, a U.S. flag was taken down from a pole in front of the school and graffiti reading "ISIS is coming" was spray-painted on a school wall, police said.
Student Jack Whalen said he spotted the suspicious backpack, which was open and smoking. He said a friend immediately went to notify the school resource office.
"I came around the corner and I could smell smoke. As I walked by, I looked inside of it [the backpack] and I could see the matches inside of it," Whalen told the St. George News.
The school of around 1,100 students was evacuated to a football stadium where the suspect was arrested.
The suspect, who remained in custody today, was charged with the manufacture, possession, sale, use or attempted use of a weapon of mass destruction, Thombley, the St. George Police Department spokeswoman, said. He was also charged with mischief stemming from the alleged vandalism at the school in Hurricane, she added.
The investigation, with the help of the FBI, is ongoing and officials said other charges could be filed against the suspect.
"It was really scary," Olivia Jones, a senior at the school, told ABC Salt Lake City affiliate KTVX-TV. "I saw cops coming from one side and then another side and grabbed this kid that was literally like five feet from her. They were kind of aggressive with him and brought him up to the top of the stadium and they were like patting him down and searching him and stuff, and he actually ended up being the suspect."
Jones said the suspect is in her seminary class and described him as "super quiet."
"My seminary teacher was saying that before they had been evacuated, he was like hysterically laughing, which is sort of like out of the usual for him," she added.
During a news conference at the school Monday, Steve Dunham, spokesman for the Washington County School District, credited the quick response from students and school resource officers in preventing anyone from being injured in the incident. He said that since the mass shooting Feb. 14 at Marjory Stoneman Douglas High School in Parkland, Florida, security has been boosted at all schools in the district.
"Since the incident that took place in Florida, our school resource officers have been very present," Dunham told reporters. "We've had additional officers throughout all of our schools. All of the police departments that we work with have had additional officers out and around our buildings."