It has been told in “DWIJENDRATATTWA” in the book “Pura Luhur Tanah Lot di Segara Kidul” written by Drs. Ngurah Oka Supartha
During the Majapahit Kingdom in East Java, there was a holy Hindu priest, named “Dang Hyang Dwi Jendra” or “Dang Hyang Nirartha”. He has been appreciated and respected by the King and the people through his spiritual teaching. He was well known in teaching Hinduism as “Dharma Yatra” (Scholarship method). In Lombok he was called “Tuan Semeru” or the teacher from Semeru. “Semeru” is the name of an active volcano in East Java.
When he came to Bali in the 15th century, the King of Bali at that time was “Dalem Waturenggong”. The King accepted and welcomed him very well. The King also gave him an opportunity to teach and extended the Hinduism through all over the island. Then he built so many temples in every sacred place with the local people.
On his journey from west to east along the southern coast of Bali he made a first stop at “Rambut Siwi” and perform a “Dharma Yatra”. In a meditation he has seen a holy ray coming from south-east direction. He followed the ray and finally he found a holy spring. Near by the spring he made a place for performing a meditation. He found a beautiful and peaceful place, then so called “Gili Beo”. Gili means rock and Beo means bird. So, that rock york look like a bird. There the priest meditated and devoted to the God of the sea.
The priest continued his journey to the east and made another stop at Beraban village. Beraban village was headed by “Bendesa Sakti Beraban”. The local people at Beraban adhere monotheism. In a very short time Dang Hyang Nirartha could able to influence the local people to became his followers. Soon the local people left their belief of monotheism. But ” Bendesa Sakti Beraban” (village head) refuse the tuition of Hinduism. he organized his faithful followers and chased away the holy priest Dang Hyang Nirartha.
The legend of the local people that Dang Hyang Nirartha protected himself by moving part the rock where he seated and become a small floating island where the temple is located now. Now, that small island is called “Tanah lot”. Tanah means earth and Lot means sea.
Finally the village head of Beraban confessed the magical power of Dang Hyang Nirartha. the village head of Beraban began to learn the doctrines of the holy priest and became a faithful followers.
Before leaving the village of Beraban, the holy priest gave the village head a “Kris” (the old traditional weapon). Until now that “Kris”, named “Ki Baru Gajah” has been considered as a sacred weapon and now is kept in the former palace of the royal family at Kediri.
Every 210 days, right on the celebration of temple festival at Pekedungan temple, approximately 300 meters to the north-west of Tanah Lot temple. On that festivity, the holy Kris of Ki Baru Gajah always carry on a procession from Kediri to Pekedungan temple about 11 kilometers.