Upper Darby High School was placed in a lockdown early Thursday morning after a report of a gun on campus.
Upper Darby police said later in the morning they had a subject in custody and the gun recovered was a plastic gun.
The school district announced the school was on lockdown around 8:30 a.m. Thursday. The lockdown has since been lifted.
According to the school's website, police responded to the school after a report of a gun on campus. Visitors were asked to avoid the school during the investigation.
Sources tell FOX 29's Steve Keeley a student had brought the pellet gun to school and was taking it out of a bag to give to a friend when it fell onto the floor. Other students saw the gun and reported it to school officials.