It's a close encounter with a great white shark that could of ended very badly.

Trevor Ketchion bravely swam within inches of a mammoth shark in a bid to deter it as he and a friend were spear fishing off Queensland's Sunshine Coast on Sunday.

Footage of the eerie encounter shows the great white lurking metres below the surface as Mr Ketchion watched on from above.

Scroll down for video

Trevor Ketchion bravely swam within inches of a mammoth shark in a bid to deter it as he and a friend were spear fishing off Queensland's Sunshine Coast on Sunday

Trevor Ketchion is an experienced spear fisher with his social media loaded with photos of unique and unusual fish species

While an average person might be quick to swim away, Mr Ketchion swam directly towards the shark and jabbed it on its back with his spear gun.

Being aggressive towards the shark is common practice among spear fishers as it can deter the animal from attacking because it fears the spear fisher as a predator.

And in Mr Ketchion's case it worked.

Footage shot by the spear fisher showed the great white slowly moving on from the area.

Mr Ketchion posted the video online and on social media, much to the amazement of his followers.

Footage of the eerie encounter shows the great white lurking metres below the surface as Mr Ketchion watched on from above

His close encounter with the great white shark could have ended very badly but Mr Ketchion bravely tried to deter the shark from a potential attack

The Brisbane father swam directly towards the shark and jabbed it on its back with his spear gun

Being aggressive towards the shark is common practice among spear fishers as it can stop it from attacking