The girl was visiting the bank with her mother but became bored and crawled away while her mum was talking with the cashier, Il Messaggero reported.
The mischievous tot clambered into an open time-lock safe that was kept on the bank floor, shutting the door behind her.
Unfortunately for the child, the safe was set to lock itself automatically and, once closed, could not be opened for 40 minutes.
As soon as the girl's mother realized what had happened, panicked bank staff called the fire brigade to try to free the child as quickly as possible.
With the help of a hydraulic wedge, the firemen managed to force the door of the safe open in less than 15 minutes, freeing the crying - but otherwise unhurt - child.
A video of the operation can be seen below.
Story continues below…