DENTON, Texas — Fire officials in Texas say a child has been rescued after being trapped in a gun safe at a sporting goods store.

Denton firefighters used hand tools to pry open the gun safe at an Academy Sports and Outdoors store Tuesday. The girl had been in the safe for more than 30 minutes.

Fire department spokesman Kenneth Hedges says the girl’s mother talked to her to keep her calm. Fire officials estimate the girl is about 4 or 5 years old.

Hedges says the safe has a locking mechanism with a keypad. He says store employees were entering the code when firefighters arrived, but the safe went into lockdown mode after the code was entered incorrectly multiple times.

It’s unclear how the girl became trapped in the safe.