Gun safes are supposed to keep children out, but a 10-year-old boy managed to lock himself in.

Daniel Jancura was playing with a safe at a Sam's Club on Monday when he became trapped inside for at least 15 minutes before firefighters and store employees could get him out.

Daniel, his older brother and cousin came across a gun safe while shopping, and couldn't resist playing with the key pad on the lock. Somehow, they managed to press the right numbers and open the 575-pound safe.

Daniel crawled inside and the door locked behind him.

"I was pretty scared," said the Rutland boy. "It was hot."

When the other children couldn't get the safe to open again, they ran to find Laura Jancura, who had brought the boys shopping at the warehouse store.

Jancura said at first she couldn't believe her son was trapped inside the safe, which is 5 feet tall, 30 inches wide and 22 inches deep.

"My back was turned for five minutes," she said.

Deputy Fire Chief John F. Sullivan said officials were prepared to force open the safe if necessary, but store employees were able to get an override code from the manufacturer.

Complicating matters, however, was a security feature that locks the key pad for at least 5 minutes so no new code can be entered.