Des Moines police Sgt. Paul Parizek told the Des Moines Register detectives are working to determine how the child got the gun. It is not clear who owned the gun.
Police told KCCI the weapon was a .380 with a missing serial number.
Roeder said the student never took the gun out of the bag and did not threaten anyone with it. He did not know if the gun was loaded or not.
Parizek officers could file charges if they find out who allowed the child to access the weapon.
Perkins Elementary principal Michael Derrick issued the following letter addressed to parents after the incident:
"I am writing to make you aware of an incident that happened today. A student brought a weapon to school. Both the police and DMPS security were notified immediately when this was discovered, and were quickly on the scene to make sure everything was safe at Perkins.
"While no one was threatened with this weapon or in any immediate danger, that does not change the fact that bringing any sort of weapon to a school is a very serious matter.
"Parents, please make sure you know what your children have with them when they come to school. It is important for the safety of them and everyone at school. If a student does bring a weapon to a school, it can lead to very serious consequences for them and their parents.
"It takes all of us — students, parents, and school staff — working to make sure we have a safe, strong community at Perkins. Your help in that is much appreciated. Please let me know if you have any questions."