Hundreds of people in India have paid their last respects to a sacred crocodile at a ritual funeral ceremony.

The reptile called Babia was considered sacred, also because it allegedly ate a purely vegetarian diet for decades and guarded a Hindu temple.

The crocodile is said to have never attacked another animal or human - not even children who visited it.

Babia was found floating lifeless in the lake Monday morning after the reptile reportedly went without food for several days.

It guarded the Sri Ananthapadmanabha Swamy Temple in Kasaragod in the southern state of Kerala, known for its intricate sculptures, and lived in the associated lake for almost 80 years, temple secretary Ramachandran Bhat told AFP on Monday.

At the funeral ceremony, the scaly corpse was decorated with flowers and blessed before being carried on a sedan chair on a bed of coconut leaves through the crowd of mourners and then buried in the temple grounds.

The temple at Kasaragod dedicated to the Hindu god Vishnu is around 3,000 years old.

For centuries, he has been protected by a single "divine" crocodile, Bhat told AFP.

"The last divine crocodile was shot by the British military in 1940 and after that Babia appeared in the lake," Bhat said.

Nobody could say where it came from.

According to believers, Babia subsisted on "prasadam," a portion of rice and sugar blessed by temple priests.

But Bhat did not support this assumption - "because there are fish in the lake".