COMPTON (AP) —  Authorities say a 17-year-old high school student was arrested after Los Angeles County sheriff’s detectives discovered he had a loaded gun at the entrance to a school near Compton.

Sheriff’s Capt. Mike Parker said Friday that detectives were looking for a witness to an unrelated crime when they saw the boy acting suspiciously outside Cesar Chavez Continuation High School in the Compton Unified School District on Thursday.

READ MORE: Driver Tries To Run Over Beverly Hills Officer, Sparking Pursuit; One Arrested

Parker says detectives discovered a semiautomatic handgun with four live rounds in the boy’s pocket. They later learned it had been stolen during a burglary in the San Fernando Valley.

READ MORE: E.G. Daily On 'Rugrat's New Holiday Special "Traditions": 'We Embrace Everyone And Everything'

The boy was booked on suspicion of four gun-related felonies and was being held at a juvenile hall in Downey.

His name was not released because he is a minor.

MORE NEWS: Angels Reportedly Re-Sign Closer Raisel Iglesias To Four-Year Deal

 (© Copyright 2010 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.)