An ISIS-inspired Utah teen has been arrested after bringing a homemade bomb to his high school and attempting to detonate it, police said.

The student, whose identity was not released, brought the homemade explosive to Pine View High School in St. George inside of his backpack on Monday.

An alleged would-be bombing at the 1,100- student school was ultimately thwarted when concerned classmates notified faculty and a school resource officer of the boy’s “suspicious” backpack that had smoke coming out, cops said.

The suspect was arrested after the school was evacuated and authorities, including the bomb squad and FBI, investigated.

“Based on our investigation we can confirm this was a failed attempt to detonate a homemade explosive at the school,” the St. George Police Department said, adding that after examining the explosive device “bomb squad members indicted that if it had detonated; the device had the potential to cause significant injury or death.”

The department noted that “it was also determined that the male had been researching information and expressing interest in ISIS and promoting the organization.”

Authorities said additional charges may be brought.

The teen is also being eyed as a suspect who raised the Islamic State group’s flag on a pole at another Utah high school last month — one day after the deadly Valentine’s Day shooting rampage at a Florida high school.

Police Officer Ken Thompson told the Associated Press that when the search warrant was executed at the teen’s home “there was evidence taken from the house that tied him to the Feb. 15 flag case at Hurricane High School.

No one was hurt during the Monday incident at the high school and no property was damaged.

Washington County School District spokesman Steve Dunham said: “I think it is a shock to all of us that something like this has happened in one of our schools.”

The police department hailed the students who notified faculty of the smoking backpack.

“Their immediate action played a large role in this incident ending with no injuries,” the St. George Police Department said.

With Post Wires