According to legend, Lord Brahma, the God of Creation, was born as the son of Vishnu Sharma. Along with him, six yogis were born, and together they performed tapasya (penance) to Lord Shiva. On the night of Sivarathiri, Lord Shiva appeared before them, transformed them into seven lights, and merged them with Himself. Consequently, the deity of this temple is revered as Sivayogi Naathar. The Sivalingam in the temple still bears seven hair-locks, symbolising this divine transformation.
There is a significant legend associated with Nandi, the bull mount of Lord Shiva. A sinner, in his final moments, called out to Lord Shiva. At that time, Nandi, who was in a turned posture, was asked by Shiva, “Who calls me?” When Nandi turned to look, the sinner’s sins were instantly erased. Lord Yama, the god of death, arrived to claim the sinner's soul, but Nandi, having intercepted him, engaged in a fierce dispute. Ultimately, Nandi prevailed over Yama, sending him away from the temple’s flag-post. Traditionally, Nandi is positioned inside the flag-post, but here, he stands outside, symbolising his victory.
Sthala Puranam:
The temple is believed to have existed through all four Yugas, with Lord Shiva being worshipped here as Purathaneswarar in the Krita Yuga, Vilvaranyeswarar in the Treta Yuga, and Yoga Nandeeswarar in the Dwapara Yuga. In the Kali Yuga, he is revered as Sivayoganathan. The deity is also known as Yoganandeeswarar, reflecting his role in the Dwapara Yuga.
The temple features four Bhairavars, known as the Chatur-kala Bhairavar, each representing different stages of human life: Gnana Bhairavar for education and employment in Brahmacharya, Swarna Akarshana Bhairavar for material gains during Grahasta, Unmata Bhairavar for health and stability in Vanaprastha, and Yoga Bhairavar for salvation in Sanyasa. Worshipping these Bhairava’s on Ashtami during Krishna Paksha (waning moon) benefits health and family life, while on Ashtami during Shukla Paksha (waxing moon) it promotes prosperity and material advancement.
A shrine within the temple honours Lakshmi-Narayanar, reflecting the belief that Lord Shiva blessed Vishnu and Lakshmi at their wedding. Special worship on Shravana Nakshatra, Ekadasi, and Saturdays is considered particularly auspicious here.
The temple's lore includes a legend where Brahma and six other yogis, born to Vishnu Sarma, undertook penance and were granted divine vision by Lord Shiva on Mahashivaratri, merging with Him. Their presence is symbolised by seven strands of hair on the rear of the Lingam.
Another legend recounts a sinner who, on Pradosham day, sought forgiveness from Lord Shiva. The deity, through Nandi, learned of the man's repentance and absolved his sins. Nandi, depicted listening to Lord Shiva, drove away Yama, making prayers on Pradosham day at this temple believed to absolve sins. Uniquely, Nandi is placed before the Bali Peetam due to this legend.
Around 300 years ago, Sridhara Ayyaval, during an annual ritual, fed a beggar, defying local custom. Consequently ostracised, he prayed to Lord Shiva, who brought the Ganges to his well. The well, now part of the Ayyaval Mutt, continues to attract visitors.
The temple is also associated with Agastyar, who is believed to visit annually on Mahashivaratri. Jatayu is said to have worshipped here and constructed the temple tank, known as Jatayu Teertham, where his feather is also believed to have fallen.
This temple, an exemplar of Chola architecture, was likely built during Raja Raja Chola I’s reign. The outer wall features an ancient sundial that accurately measures time between 6 AM and 6 PM, showcasing the engineering and architectural prowess of the Chola period. The temple is currently managed by the Thanjavur Palace Devasthanam.