A second grader at Agua Caliente Elementary School in Palm Springs brought a gun to school in his backpack on Thursday, according to the school district.
Spokeswoman Joan Boiko said the student brought the gun to show to another student, who then told the teacher.
Palm Springs police were eventually called in.
Boiko said the gun was not loaded and a letter was sent home to parents on Thursday explaining what happened.
No one was injured.