There were two Siva Ganas (Siva's disciples who live in Kailash): 'Malyavan' and 'Pushpadanta'. Though they are Siva Ganas they always quarrel with each other and fight for one thing or other. In one fight 'Malyavan' cursed 'Pushpadanta' to become an elephant on earth and the latter cursed the former to become a spider on earth. The elephant and the spider came to Jambukeswaram and continued their Siva worship. The elephant collected water from river Cauvery and conducted ablution to the lingam under the Jambu tree (Eugenia jambolana, the rose-apple tree) daily. The spider constructed his web over the lingam to prevent dry leaves from dropping on it and prevent sunlight directly falling on it. When the elephant saw the web and thought it was dust on lingam. The elephant tore them and cleaned the lingam by pouring water and the practice continued daily. The spider became angry one day and crawled into the trunk of the elephant and bit the elephant to death, killing itself. Siva, in the form of Jambukeswara, moved by the deep devotion of the two, relieved them from the curse. As an elephant worshipped Siva here, this place came to be known as Thiru Aanai Kaa (thiru means holy, aanai is elephant, kaa (kaadu) means forest). Later the name 'Thiruaanaikaa' become 'Thiruvanaikaval' and 'Thiruvanaikoil'.