Police identify the teen responsible for setting off a gun inside his Bronx high school.

17-year-old Denzel Lopez was arrested late Thursday night at his home in Mott Haven.

Cops say they found 15 loose rounds in a shoebox.

Lopez now faces charges for allegedly violating local bullet possession laws.

Police say a teacher heard the gunshot go off just after 2 p.m. Thursday, at Metropolitan High School in Longwood.

Investigators say there were about 20 students in the room at the time, but no one was hurt.

When officers arrived, they found a bullet hole in the floor.

Investigators tell NY1 it looks like the gun went off accidently.