A 4-year-old Australian boy is relieved to be free after getting his arm stuck for six hours inside a vending machine.

On Sunday, Leo Shorthouse reached insidea  machine located in a hotel lobby in Melbourne and got his arm trapped by the machine’s anti-theft system.

According to his father, it is the first time Leo has ever seen a vending machine and the child's curiosity got the best of him. 

"I don't think he's seen a vending machine before so he saw the Oreos, and some biscuits and a few other things," his father Aaron Shorthouse told a CNN affiliated station

RELATED: Three-year-old boy rescued in four-alarm fire in Chelsea

The Shorthouse family lives in Arnhem Land, a remote, rural region located at the very northern tip of Australia. 

When rescue workers arrived to the scene, they tried to distract Leo by showing him cartoons from their smartphones and giving him a stuffed toy to hold onto. According to CNN, the child had to be sedated at times.

After he was freed from the grips of the vending machine he was later taken to a local hospital and was in stable condition.