Origin/History :-
The temple is believed to have been constructed in the 3rd century CE and is regarded as one of the Mada Temples built by Kochengata Chola, an early Chola emperor. The Later Cholas undertook a reconstruction of the temple in granite during the 12th century CE, and it underwent extensive renovations by the Nayak Kings.
Inscriptions found within the temple are attributed to several notable rulers, including Kulothunga Chola II, Rajaraja Chola III, Rajendra Chola III, and Sundara Pandya. These inscriptions indicate the historical significance of the temple and its connections to these rulers. Additionally, the place was referred to as "Arulmozhi Deva Valanattu Valivala Kootrathu Upayakula Chaturvedi Mangalam," as noted in the temple's inscriptions.
Puranic Significance :-
Once, a virtuous ascetic committed sins due to his past actions, resulting in his rebirth as a black sparrow. In this new form, the tiny bird was attacked by a larger bird and was wounded, bleeding from its injuries. Seeking refuge, the bloodied sparrow took shelter in a nearby tree, under which an old Shiva Yogi was preaching to his disciples. By chance, Karikuruvi, the sparrow, overheard Yogi's teachings.
"Dear friends! Madurai is the best among Shiva Thalams. The finest of the tirthas is Pottamarai there. Madurai Chokkanathar is the greatest of the murtis. There is no place in the world like Madurai. Lord Somasundara grants boons to those who worship Him," the Yogi proclaimed.
Enlightened by these words, Karikuruvi flew toward Madurai, aware of its previous birth and the reason for its current form as a sparrow.
Upon reaching Madurai, the sparrow crawled over the Somasunderar Temple and eventually drowned in the Pottamaraikulam. Shiva was worshipped through this act, which continued for three days. Pleased with the sparrow's devotion, the Lord called it forth and imparted the 'Mrityunjaya' mantra. This blessed the sparrow with enlightenment, causing it to transcend its former intelligence.
The sparrow then addressed Shiva, saying, "Lord! I am enlightened by Your mercy. However, I face a flaw: as the smallest bird, I am harassed by larger birds and ridiculed by onlookers."
In response, Lord Shiva reassured, "You will be stronger than all the birds." Thus, Karikuruvi acquired the name "Valian." A sparrow descended from this lineage came to this place and worshipped Manathuna Nathar, attaining salvation. As a result, this location became known as Valivalam.