Tanah Lot Temple is said to be the work of the 15century priest Nirartha. The story goes that during his travels along the south coast he saw the rock-island's beautiful setting and rested there. Some fishermen saw him, and bought him gifts. Nirartha then spent the night on the little island. Later he spoke to the fishermen and told them to build a shrine on the rock for he felt it to be a holy place to worship the Balinese gods.
The Tanah Lot temple was then built and has been an important part of Balinese mythological history for centuries. The temple is one of seven sea temples around the Balinese coast. It was said that each of the sea temples was to be within eyesight of the next so that they formed a chain along the south-western coast.
At the base of the rocky island, poisonous sea snakes are believed to guard the temple from evil spirits and intruders. There is said to be one giant snake which also protects the temple. It is believed that this snake was created from Nirartha's scarf when he established the island.