We all know that dogs like to befriend just about anything, but one pup's attempt to chase after a shark has astonished internet viewers.

A video was posted on TikTok by user David López Enguídanos (@davidlopeze) showed the terrifying moment when a dog leaped into the open water and tried to swim after a nearby shark in Alicante, Spain.

In just a matter of days, the clip has already generated over 10 million views on TikTok and more than 572,000 likes at the time of writing. The caption layered over the shocking clip translates to "dog vs. shark."

Panicked bystanders who watched the events unfold can be heard shouting "no" at the dog, but that certainly didn't perturb him from getting up close to what is thought to have been a blue shark. Once the dog, whose breed is unclear, caught up to the shark, he appeared to try to bite its tail softly before thinking better of that.

Throughout the unexpected encounter, the shark continued to swim away from the dog, who then appeared to paddle back to safety as well.

The dog chases after the shark in the water off the coast of Alicante, Spain. The pup even appeared to nibble the fish's tail gently before swimming back to land. The dog chases after the shark in the water off the coast of Alicante, Spain. The pup even appeared to nibble the fish's tail gently before swimming back to land. @davidlopeze / TikTok

Thankfully, the blue shark wouldn't have found the dog appetizing anyway, as their diet mainly consists of fish, squid, and crustaceans. They aren't considered aggressive, but Encyclopaedia Britannica does suggest that the sharks have been implicated in several unprovoked attacks on humans in the past.

Blue sharks typically measure between 5.6 and 7.2 feet long, but they can even grow up to 13.1 feet in length. In the wild, they can typically live up to the age of 15 or 16, but in captivity, that is reduced to about 8 years instead.

Indeed, with so many wild creatures and delicate habitats along the shore, it is vital that dogs are under constant supervision. As much as canines love diving into the water and making a splash, the American Kennel Club (AKC) highlights that even the most-experienced and well-behaved dogs need to be monitored. Even if you don't see a large fin weaving through the water, there are still plenty of other dangers to be wary, including stingrays and jellyfish.

The AKC says that any dog allowed off the leash near the sea should have a very reliable recall, and you should be able to control their behavior with just a hand signal or a verbal cue. If they haven't mastered that proficiency yet, the leash should be kept on for their own safety.

How Did TikTok Respond?

Since Enguídanos posted the video of the dog's antics on TikTok, it has stunned many social media users already, leading to more than 6,100 comments so far.

One TikTok user wrote: "His instinct was to save whatever he thought was swimming, till he realized it's not what he thought."

Another person posted: "Shark was probably very confused because nothing ever chases it."

"He went to say hello," added a third TikTok user.

One comment reads: "He went to make sure it was a shark."

Newsweek reached out to @davidlopeze via email for comment. We could not verify the details of the case.

Do you have any viral videos or pictures that you want to share? We want to see the best ones! Send them in to life@newsweek.com and they could appear on our site.

Disclaimer: The copyright of this article belongs to the original author. Reposting this article is solely for the purpose of information dissemination and does not constitute any investment advice. If there is any infringement, please contact us immediately. We will make corrections or deletions as necessary. Thank you.