Updated

Memphis police say no charges will be filed against a kindergartener after a gun discharged inside the child's backpack in a school cafeteria.

Police spokeswoman Karen Rudolph says the 5-year-old student and the child's mother were released from custody Thursday night, hours after the kindergartner was detained by police at Westside Elementary School.

Officials say the child was waiting for the opening bell in the cafeteria when the gun went off. No one was hurt, and security officers took control of the backpack.

Investigators determined the child obtained the gun from a closet at home and placed it in the backpack. Rudolph said Friday that the information was presented to the attorney general's office, which decided not to file charges.

Police are not releasing the identity of the child and mother.