MANCHESTER, N.H. (AP) — Police in New Hampshire say they found a 5-year-old girl sleeping with a loaded handgun on her chest as they investigated a report of shots fired in the apartment.

Manchester police say 29-year-old Thomas Gulledge gave police permission to go inside his apartment Wednesday night. Police said they found deplorable conditions, including dog feces, trash, rotten food and flies.

They found the child sleeping on a bed filled with trash and rotting food. They noticed the .45-caliber gun inside of a holster resting on her chest.

The child wasn’t hurt. Police put her in the custody of a foster family. Gulledge was charged with reckless conduct. He was scheduled to appear in court Thursday. It wasn’t known if he had a lawyer and a phone number couldn’t be found for him.