Luckily, the diver appears uninjured after the attack in the dark waters

The fish is caught in the divers oxygen equipment and violently thrashes

A scuba diver has had an incredibly lucky escape after a swordfish charged at him and speared through his diving equipment, narrowly missing his body.

Startling footage shot by a fellow diver off the coast of Brazil shows the man walking along the ocean floor in darkness except for the light of a torch, when the five-foot swordfish shoots out of the gloom and impales itself on the diver's oxygen equipment.

The fish can be seen thrashing wildly as it tries to free itself from the diver's bright yellow equipment.

Footage shot shot in waters off Brazil shows the man walking along the ocean floor in darkness, save the light of a torch, when the five foot swordfish shoots into the light and impales itself on the diver's oxygen equipment

The startled diver is clearly shocked by the attack and looks toward the camera with fear in his eyes

The startled diver is clearly shocked by the attack and looks toward the camera with fear in his eyes.

With the fish still lodged in the equipment fastened to his back, the diver acts fast and quickly climbs a guide rope back to the submerged vehicle he was working from.

His colleague, who is filming the drama unfold, follows him to the vessel.

It is unknown if the diver sustained any injuries.

The fish thrashes wildly before realising it is stuck and is unable to free itself from the diver's bright yellow equipment

The frightening footage has been viewed more than a million times and shared over 3000 times since it was posted last week.