King Kochenganan was suffering from a stomach ulcer when he received a divine voice indicating that he could be cured if he built a temple in a location with three sacred trees, known as sthala vrukshas. Upon discovering Kondrai, Pakku, and Vilwa trees at the site, he began constructing the temple. However, he faced a persistent challenge: each day, the wall built the previous day would collapse. In desperation, the king prayed to Lord Shiva for a solution and was advised to feed 1,000 Brahmins for 48 days. Despite his efforts, he found that he was one Brahmin short each day. Pleading for assistance again, on the final day, the king was pleased to see all 1,000 seats filled with Brahmins.
Curious about the identity of the last guest, the king politely asked the old man where he was from. The old man replied, “Yarukku Oor,” meaning “to whom does this place belong?” This response angered the king’s guards, prompting the guest to flee and disappear into an anthill. When the anthill was opened, a Swayambulinga (self-manifested Shiva Linga) was discovered inside, bearing an injury from the crowbar used to break it open; this mark is still visible on the Linga today.
Sthala Puranam :
The local Chola king suffered from a mysterious illness that no doctors could cure. One night, Lord Shiva appeared to him in a dream and instructed him to feed a thousand people for 48 days. The king undertook this task, but at the end of the period, despite having arranged 1,000 seats, only 999 people attended each day. In desperation, he prayed to Shiva for a solution. On the final day, to the king's astonishment, all 1,000 seats were filled, and Lord Shiva appeared before him in the guise of an old man. When the king asked the old man where he came from, instead of answering, the old man questioned, "Whose town?" Realising that the old man was, in fact, Lord Shiva, the king dug into the mound and discovered a lingam hidden there. He built the temple at that location, where a scar is said to mark the spot where the linga was struck during excavation. The king was cured of his illness, and Shiva became known as "One in a Thousand," as he presented himself as one among the thousand guests. The old man's words, "Yarruku Ur," have evolved over time to become "Akkur."
According to another legend, Kochenga Chola was afflicted by an illness. A heavenly voice instructed him to find a place with three sacred trees (sthala vruksham) and build a temple there to be cured. While searching, an old Brahmin approached the king and inquired about his troubles. Upon hearing the king's plight, the Brahmin, who was actually Lord Ganesha in disguise, advised him to immerse himself in the temple pool for healing and assured him that the temple he built would be holier than Kashi. Following the Brahmin's guidance, the king immersed himself in the pool and discovered this sacred site nearby. He then built the temple and was cured. Here, Vinayagar is known as Poiya Pillaiyar.
Due to its elevation, the place became known as Thandonri Math (with "Math" signifying a location on a high level).
Arunagirinathar has composed hymns praising Lord Murugan in this temple in his work Thirupugazh. This temple is one of the loftiest built by Kochenga Chola and is significant as the site where Sage Agastya witnessed the divine marriage of Shiva and Parvati. In this temple, Goddess Parvati has her separate sanctum facing East in a Kalyana Kolam (marriage form). The shrine for Murugan is designed in the form of a chariot, and there is also a separate shrine for Saraswati.
This location is the avatara and mukti sthalam of Shalali Nayanar, who lived here throughout his life, devoted to the continuous repetition of the Panchakshara mantra.
Administration History :
The temple's administration has evolved over centuries, initially overseen by local Chola kings and later by Pallavas and Vijayanagara rulers. Inscriptions from the temple indicate that it was managed by the Perungudi Makkal, also known as Koota Perumakkal, during the reign of Rajaraja Chola III. Koperunchingan I, a Pallava king, played a significant role in revitalising the area by remitting taxes to encourage agricultural activity and support the temple. In the 13th century, conflicts between Shaivites and Vaishnavites were evident, as noted in inscriptions detailing disputes over sacred baths. Under Krishnadevaraya, tax exemptions for temple lands were recorded in 1517 CE, reflecting the ongoing royal support for the temple's activities and maintenance.