The name of the temple is named after the rock it was built on, with “Tanah” meaning “earth” and “Lot (lod/laut)” meaning “sea”. The temple is said to have been built in the 16th century by Dang Hyang Nirartha (a famous monk in Bali) to be built in the 16th century as a place to worship the Balinese sea gods.
The true origins of Pura Tanah Lot (the temple that sits atop Tanah Lot) are lost to the sea spray of time, but according to legend it was created in the 16th century at the behest of a now-mythologized holy man. Along with the other six sea temples along the Bali shore, each within eyeshot of the next, it is meant to pay respect to the guardian spirits of the sea. The constant pounding of the currents against the base of Tanah Lot have created a number of sea caves at the foot of the rock formation, many of which are home to sea snakes. These snakes are rumored to protect the temple from evil spirits along with a giant nightmare snake that lurks in the waters around the temple.