(NBCSANDIEGO) — A Tierrasanta teacher arrested for having a loaded gun on campus once told students that he had the gun to protect the school according to one student.

Farb Middle School teacher Ned Walker, 41, was arrested in the school’s parking lot Monday morning.

Walker teaches seventh and eighth grade English at the middle school.

When the school’s principal became aware of allegations that Walker had brought a gun to campus, she contacted school police, according to district spokesperson Jack Brandais.

Note: Read our discussion guidelines before commenting.