During the reign of Koon Pandiyan (Hunchback Pandiyan) in the Pandya kingdom, Jainism was the dominant religion with strong royal support. Saivism and the worship of Lord Shiva were nearly eradicated. It was in this period that the child saint Thirugnanasambandar visited the region, creating fear among the Jain monks. In their hostility, they attempted to eliminate him by setting fire to his camp. Anticipating their intentions, Thirugnanasambandar sang ten powerful verses redirecting the fire towards the king, who developed severe smallpox-like boils.
The Jain monks failed to cure the king despite their best efforts. Desperate, the king sought help. Thirugnanasambandar compassionately sang another Pathigam (ten verses) starting with "Mandhiram Avathu Neeru", extolling the sacred ash of Lord Shiva. Applying the holy ash from the Meenakshi Amman temple’s kitchen, the king was miraculously cured, leading him to realize the glory of Saivism.
The Jain monks, disturbed by their failure, challenged Thirugnanasambandar to a contest: both sides would place a palm leaf with verses in the Vaigai River, and the victor would be the one whose leaf swam upstream. The Jains’ verse began with "Athi Nathi", while Sambandar’s began with "Vazhga Andanar, Vanavar Aaninam". The Jain verse was washed away, whereas Sambandar’s floated upstream and reached the riverbank, establishing the might of Lord Shiva.
The spot where the victorious leaf reached the bank became known as Thiruvedagam, and the presiding deity, Lord Shiva, is called Edaganathar.
Administration History :
The administration of the Thiruvedagam Temple has evolved over the centuries, with control shifting through different dynasties. Initially managed under the Pandya rulers, it later came under the jurisdiction of the Vijayanagara Nayaks. During the medieval period, the temple’s administration was supported by local land grants and endowments from various rulers. It was managed by religious bodies such as the Thirugnanasambandar Thirumadam. The temple has been maintained by various hereditary families and local temple trusts, with periodic renovations and Kumbhabhishekams conducted for its rejuvenation. Today, it is under the administrative control of the Hindu Religious and Charitable Endowments Department of Tamil Nadu.