A man is lucky to be alive after a massive great white shark found its way into the cage he was submerged in.

The extraordinary footage was posted on YouTube, with the video's caption suggesting the terrifying incident happened on a recent trip to Guadalupe Island, off the west coast of Mexico.

The video shows a great white shark approaching a diving cage, which is attached to the side of a boat - but it's unable to stop and bashes at the cage, before breaking one of its bars and wriggling in.

The man who published the footage explained that the shark was not aggressively charging at the cage, but rather biting at a large chunk of tuna attached to a rope nearby.

He says that when a shark bites, it is temporarily blinded - and combined with the fact they cannot swim backwards, the shark was unable to do anything but continue its advance into the cage.

Luckily the diver trapped with it was experienced and remained calm - he let the shark find its way out of the top of the enclosure before clambering out himself, miraculously uninjured.

The man who posted the video said all the boat crew returned to the cage the following day after recognising that it was "a very rare event".

He said the boat crew made "what could've been a tragic event into a happy ending", and also credits God and luck for playing a part in the dramatic escape.

Newshub has not been able to verify the authenticity of the video or get in contact with the publishers.

Newshub.