A 7th grader brought a semi-automatic pistol to school Friday with the intention of shooting another student.
The principal at Opelika Middle School says a tip from another student led to a search of the student's locker, where the gun was discovered in the 12-year-old's book bag.
Police say the student intended to shoot a classmate after school at the recreation center next to the school.
The boy, whose name has not been released, was taken to a youth detention center.
The 7th grader has been charged with bringing a firearm onto a campus and threatening to harm or kill another person.