A nine-year-old boy playing hide and seek at his grandfather's home had to be rescued by firefighters after he hid in a safe.

The boy was playing with his little brother at the home in Lichterfelde, Berlin, when he found the ultimate hiding place.

Unfortunately, the door to the unused safe closed on the boy, locking him in.

His whereabouts were eventually uncovered – but his grandfather was the only person who knew the entry code, and he was away.

With no other option, the family called for help from the fire brigade.

Oxygen was pumped into the safe via a small plastic tube

It took three hours of testing family birth dates in the hope of uncovering the secret entry code, while oxygen was pumped into the safe through a tiny crack as a precaution.

Just as a specialist team was about to start breaking the safe open, they entered the correct six-digit code.

Firefighters say the child remained calm throughout the ordeal and was shocked but unharmed.

Berlin firefighter Thomas Kirstein said it was happy ending and super early Christmas present.