Passengers on a boat tour in the Bahamas yelled in horror after witnessing a dog jump onto a hammerhead shark. The 12-foot hammerhead shark was swimming near to shore when the tourists observed the dog racing along a dock on shore and then sprang right into the water as the shark passed past.

Many tense minutes ensued as the dog and shark circled one another before the dog made it safely back to shore. Footage of the event was caught by the tour boat’s skipper and crew member, Rebecca Lightbourn from Exuma Water Sports. She informed NBC News via email that they don’t know why the dog decided to jump onto the shark.

“We’re unsure if the dog just wanted to play or wanted to protect his home but he just jumped right in!” Lightbourn said in the email. “He managed to splash around and even tried to tear a chunk out of his fin, but the shark swam off, pretty unsure of what just happened!”

The footage shows how the dog swims toward the shark while passengers shout in horror. The two animals appear to circle around each other and at one moment a guest exclaims, “He’s going to bite the shark!”

Passengers were incredibly concerned about the dog’s welfare with one person continually yelling at the dog, “Get out, baby, go out!”

After roughly two scary minutes, the dog finally jumps onto the rocks and gets out of the water. Passengers couldn’t help but cheer and amazed at the dog’s luck. ”How’d he get away with that?” said one observer. Some folks were scared the dog could just jump into the water again, but happily the canine stayed on dry land.

Lightbourn told the news station that the dog is a domesticated stray called a Bahamas Potcake and is cared after by the keeper of the private island. The dog usually welcomes the tour boat on their twice daily trips but he stays ashore.

They think that the hammerhead shark drew the dog’s attention and stated that it was an uncommon occasion to witness such a massive hammerhead near to shore. She also said that she’s seen the dog since the incident and he’s ““100% A-ok.”