Helpless Baby Elephant Trapped in Well Rescued by Indian Village in Heartwarming Video

In India, elephants live side by side humans. BIJU BORO/AFP/Getty Images

A baby elephant trapped in a well in the south Indian state of Kerala was freed by park officials and—lucky for us—the entire rescue operation was captured on film.

On Friday, a baby elephant fell into a human-made well in Thattekad, Kerala, in India, while trying to cross the Urulanthanni River. Though it tried and tried, the little animal was unable to get out on its own or with the help of nearby family members. Here's when forest officials stepped in. The government workers, along with some villagers who happened to be nearby, used a mechanical digger to help remove dirt around the well so that the youngster could escape on its own.

Related: Why elephants don't get cancer-and what that means for humans

According to UPI, the entire mission took around five hours and the effort was successful. Although not seen in the video, Shiju V. Chacko, the section forest officer of Thattekkad district, confirmed that the elephant was reunited with its mother and the rest of the herd on the other side of the well, International Business Times reported. At the end of the video, the mother elephant raises her trunk at the camera, as if to thank the humans for helping her young calf.

Asian elephants, such as those in the footage, are both culturally and environmentally important to India, but they are now considered an endangered species. Slightly smaller than their African cousins, Asian elephants still weigh nearly five tons. Many males do not have tusks.

Related: Elephants are legal persons and deserve to be free, group claims in court petition

Becoming trapped in a well is not entirely uncommon for elephants. A similar occurrence happened only a few weeks ago in Sri Lanka, The Times of India reported.

But the biggest threats to the Asian elephants are habitat loss. Forest dwellers, the elephants' habitat is being lost to roads, dams and other infrastructures. The World Wildlife Foundation reports that Asian elephants now occupy about 15 percent of their original range area in Asia. Elephants in India have the most living space, while those in Sri Lanka and Sumatra have lost as much as 70 percent of their habitat.

In addition, the elephants are also sometimes threatened by humans, as they can raid farmer's field and damage their crops. A graphic photo of Indian farmers setting an Asian elephant and her calf on fire in an effort to get them off their fields made headlines in early November after it was given the Sanctuary Wildlife Photography Award 2017 by Sanctuary Asia. The elephants are also sometimes taken from the wild to be sold into elephant wildlife tourism, mostly in Thailand, The World Wildlife Foundation reported.