Seeing her flounder, his instincts kicked in and the dog, called Matyas, gently took hold of her shirt with his teeth and dragged her towards the beach. Picture: YouTube.com

London - Fearing she is about to be swept out to sea, a dog pulls a little girl from the ocean. The animal had been playing on a beach with his owner’s granddaughter when a wave washed over her.

Seeing her flounder, his instincts kicked in and the dog, called Matyas, gently took hold of her shirt with his teeth and dragged her towards the beach.

A video clip shows the little girl, who was in no real danger, laughing as Matyas "rescues" her. 

When he thinks she is a safe distance from the waves, he releases his grip. The footage, filmed earlier this month at Gouville-sur-Mer in northwest France, has been shared on social media and viewed more than a million times.

One viewer wrote: "Nice to have such a smart dog around... he watches that little girl better than many adults would." Another said: "He’s doing his job protecting her. Good doggy."