 According to a Tamil legend, the Vedas locked the gates of the temple after worshipping Shiva.The Nayanmars (Saiva saints) Appar and Tirugnanasambandar could not enter the locked temple.At this, on Tirugnanasambandar's request, Appar sang devotional hymns praising Shiva, after which the gates opened.