Residents of a village in Kerala, India, joined hands to rescue a baby elephant that got separated from its herd and fell in a hole.

The incident happened last week when the herd was passing through the village in the night after making their way through the Urulanthanni river.

The calf strayed from its mother and fell into a deep grubby hole. Unable to get out, it started crying out for help.

The baby elephant's agonizing cries woke up the villagers, who ventured out of their houses to find out what was happening.

They found the poor animal in a helpless state, restless and covered in mud while it tried its best to get out of the hole. But the hole was narrow and deep, making its escape attempts fruitless.

Seeing the animal's plight, the villagers were galvanized to mount a rescue operation to help the little elephant get out of the hole.

Meanwhile, the herd from which the calf had separated waited patiently at a distance.

Using an excavator, the villagers toiled for five straight hours to create a path for the calf to climb out of the hole.

As soon as the calf was able to come out of the hole, it immediately ran towards its mother, who patiently made her way through trees and a river to take her baby back to the herd.

The video of the rescue filmed by one of the villagers shows the mother elephant thanking the rescuers with a raised trunk, apparently in gratitude.