Receive the latest california updates in your inbox

A student at Desert Pathways High School in Lancaster alerted her principal that her peer may be armed with a firearm. A 15-year-old boy was arrested Thursday on suspicion of having a loaded weapon on campus. Beverly White reports from Lancaster for the NBC4 News at 11 p.m. on April 11, 2013. (Published Thursday, Apr 11, 2013)

A 15-year-old boy allegedly brought a loaded .45-caliber pistol to the Lancaster high school he attends, apparently with the intent to protect himself while traveling to and from school, the Lancaster Sheriff’s Department said Thursday evening.

The teen, whose name was not released, was arrested on suspicion of possession of a loaded firearm on school grounds, sheriff’s officials said in an alert released shortly after 6 p.m.

A female student told the principal at Desert Pathways High School, a special education school located at 6300 West Avenue L (map), that a fellow classmate may have been armed about 7:30 a.m. Thursday.

The girl, who wished to remain anonymous, said the student called her about 6 a.m. to tell her he was attacked at a Walmart in recent weeks and was planning on bringing a gun to school for protection.

"I told him I do not want him to do that, he is risking his future and he is risking his life and others around him," she told NBC4.

She added that the boy then hung up on her and later told her he was "just joking."

"I told him it wasn't funny," she said.

There was nothing to suggest the teen threatened students or staff at the high school, sheriff’s officials said. Investigators are working to confirm whether the boy was attacked off-campus like he said and learn how he obtained the firearm.

Beverly White is in Lancaster speaking with the student who alerted the principal. Watch the NBC4 News at 11 p.m. for her full report.