A 14-year-old student at a Northeast Washington school was arrested Thursday morning after a tip from a classmate led them to a youngster holding a pellet gun, according to D.C. police.

Police said they responded to the Noyes Education Campus in the 2700 block of 10th St. NE about 10:55 a.m.

Cmdr. Andrew Solberg, who runs the 5th District, said a student saw the boy with the gun inside a bathroom and quickly told a teacher, who informed the principal.

“He was a real hero,” Solberg said of the student who told the teacher.

The youth who allegedly had the weapon was arrested and charged as a juvenile with possession of a pellet gun. Police said the school was locked down, with students and teachers ordered to remain in their classrooms, for about 10 minutes.

Police said no shots were fired and no one was injured. The school, in the Brookland neighborhood, has 282 students from preschool through 8th grade.

Emma Brown contributed to this article.