A young girl was rescued Tuesday evening after she became trapped in a gun safe at a Denton Academy Sports and Outdoors, fire officials said.

The Denton Fire Department was called about 6:45 p.m. to the store in the 2600 block of West University Drive after the girl crawled into the safe at the front of the store, Assistant Deputy Fire Chief Kenneth Hedges said.

A locksmith confirmed that the code on the electronic keypad had been attempted too many times and the safe could not be opened for at least an hour, he said.

Instead, firefighters used long-handled fire tools to pry open the door to free the girl. It took 22 minutes to get her out.

There was no concern that the girl would run out of air and said she wasn't in distress, Hedges said.

The mother of the girl, who was 4 or 5 years old, talked to her daughter through the door to keep the girl calm.

It's unclear how the girl became trapped. Her head was pinned between the door and an interior shelf, Hedges said.