Koodal Azhagar temple
Koodal Aḻagar Temple in Madurai, a city in the South Indian state of Tamil Nadu, is dedicated to the Hindu god Vishnu. Constructed in the Dravidian style of architecture, the temple is glorified in the Naalayira Divya Prabandham, the early medieval Tamil canon of the Alvar saints from the 6th–9th centuries CE. It is one of the 108 Divya Desams dedicated to Vishnu, who is worshipped as Viyooga Sundarrajan, and his consort Lakshmi as Mathuravalli. A granite wall surrounds the temple, enclosing all its shrines. The temple has a five-tiered rajagopuram, the gateway tower. The temple is originally believed to be built by the Pandyas, with later additions by the Vijayanagara empire and Madurai Nayaks kings who commissioned pillared halls and major shrines of the temple during the 16th century. Koodal Aḻagar is believed to have appeared to slay the demon Somuka who abducted the four Vedas. The temple follows the Tenkalai tradition of worship. Four daily rituals and three yearly festivals are held at the temple, of which the fourteen-day annual Brahmotsavam during the Tamil month of Vaikasi (May - June) being the most prominent. The temple is maintained and administered by the Hindu Religious and Endowment Board of the Government of Tamil Nadu. Legend

As per Hindu legend, a ruler named Vallabhadeva went incognito everyday to know about the lives of people under him. During one of his visits, a scholar told him that the ultimate goal in life is to "collect provisions in summer and save for winter", which also meant that one should work during his younger days and save for his old age. Vallabadeva was not convinced and he set this as a competition among scholars to make him realize the true value of life. Vishnucitta, who would later go on to become Periyalvar, one of the twelve most revered saints of Vaishnava sect, came to Madurai from Srivilliputhur. He was believed to have been directed by the heavenly words of Vishnu and he expounded the sacred verses. He explained the concepts of Hitham and Purushartham from Vedas and proclaimed that attained the feet of Narayana could lead to salvation. Vallabhadeva was pleased with the explanation and he awarded a bag of gold to Visnucitta. It is believed that the current gopuram of Srivilliputhur Temple, was built by Periyalvar with the gold won. History
The inscriptions in the temple refer the presiding deity as Koodal Alagiya Perumal. There are inscriptions in the temple indicating generous gifts and endowments in the form of land, houses and gold to maintain and administer the temple. An inscription from the 8th century indicates the donation of granite stones for the construction of Ardha Mandapa. The temple was expanded during the rule of Madurai Nayaks in the 16th century. The Dvajasthambam mandapam (flag staff) and mandap before the Hema Pushkarani were constructed by the Nayaks. The Mathuravalli Thayar Shrine (Thayar) was constructed and The temple was renovated by Muthu K.R.V. Alagappa Chettiar of Devakottai in 1923. Since then, the temple is maintained and administered by the Hindu Religious and Charitable Endowments Department of the Government of Tamil Nadu. Architecture

Koodal Aḻagar temple covers an area of about  and has a five-tiered gopuram (gateway tower) raising to a height of . The temple is enclosed in a rectangular enclosure with huge granite walls. The central shrine has an elevated structure and houses the images of the presiding deity, Koodal Aḻagar, in three forms, namely sitting, standing and reclining postures. The image made of granite is sported in sitting posture and  tall. The images of Sridevi and Bhudevi are present in either sides of Koodal Aḻagar. The festival deity is named Vyuga Sundararajar and the image is  tall made of panchaloha. The vimana, the shrine over the sanctum is Ashtanga in architecture, which has eight parts, namely, Adhistana (base), three Padas (struct), Prashthana (limb), Griva (leading struct), Shikara (cylindrical holder) and Stupi (top portion). The outer parts of the vimana has stucco images of sages, Dashavataram, Bhudevi and Varaha, Lakshmi Narasimha, Lakshmi Narayana, and Narayanamoorthy. The vimana is believed to be the work of Vishvakarma, the divine architect. The shadow of the vimana does not fall on the ground. The Ashtanga Vimana is found in Mannar Koil, Ambasamudram, Uthiramerur, Thirukoshtiyur and Cheranmadevi temples. The inner walls of the sanctum has paintings of the Ashtadikpalakas. The shrine of the consort of Koodal Aḻagar, Mathuravalli, is located to the south of the main shrine. There are smaller shrines of Lakshmi Narasimha, Rama, Lakshmi Narayana, and Krishna located close to the sanctum. The shrines of Andal, Narasimha, and Manavala Mamunigal are found in separate shrines around the first precinct. The shrine of Andal has painting depicting puranic stories and inscriptions detailing devotional literature. The shrines of Garuda, Anjaneya, Ramanuja, Vedanta Desika and Alvars are found in the second precinct. The pillars in the halls leading to the sanctum have small sculptures, in the second precinct. The second floor has a shrine dedicated to Suryanarayana standing along with goddesses. The Teppakulam, the temple tank, is located outside the temple premises. It has a centre hall made of granite. Religious significance
Periyalvar obtained the name as he is believed to be an ardent worshipper of Vishnu. While coming out of Madurai, he was taken out in procession to Srivilliputhur and he got the divine vision of Vishnu at the instance. He started reciting his composition, Periya Tirumoli, which was compiled in Naalayira Divya Prabhandam by Manavala Mamunigal. Manavala decreed that the verses of Periyalvar starting with Tirupallandu should be the first and last verse while reciting Prabhandam in any sacred occasion in Vishnu temples. Ramanuja, a proponent during the 10th century, believes that Tirupallandu originated at Madurai. Thus Koodal Aḻagar temple finds an indomitable position in Vaishnavite belief. During Mahapralaya, the great disaster, the devotees sought the abode of Vishnu in Madurai. It is believed that Vishnu stood as a bulwark against the impending disaster, giving him the name of the city as Naanmadakoodal or Koodal Nagar ('Koodal' in Tamil is bulwark). The place is mentioned to be significant during four ages namely, Satya Yuga, Treta Yuga, Dvapara Yuga and Kali Yuga. The temple has Navagrahas, the nine planetary deities, which are otherwise found only in Shiva temples. It indicates Vaishnavite cultures during the medieval period. Literary mention

Historians are of the opinion that Koodal Aḻagar temple finds mention in Sangam literature (3 century BCE - 3 century CE) in works like Madurai Kanchi by Mangudi Marudan, Paripāṭal, Kaliththokai and Silappatikaram. Madurai Kanchi details the Thiruvonam festival celebrated in the temple. Koodal Aḻagar temple is revered in Nalayira Divya Prabhandam, the 5th–9th century Vaishnava canon, by Periyalvar, Thirumalisai Alvar and Thirumangai Alvar. The temple is classified as a Divya Desams, one of the 108 Vishnu temples that are mentioned in the book. During the 18th and 19th centuries, the temple finds mention in several works like 108 Tirupathi Anthathi by Divya Kavi Pillai Perumal Aiyangar and Koodal Sthala Purana. Koodal Purana details the origin of Vaigai river flowing through Madurai. It is believed that Vishnu stood up as Trivikrama, with one of his foot rising to the skies and the foot reached Brahmaloka, the abode of Brahma. Brahma was pleased to perform ablution to the raised foot and the water is believed to have emerged as a rivulet called Krithimala. A large number of banana trees sprang up in the place and it came to be known as Kadhalivana, a forest of banana trees. Satyavrata, a ruler of Madurai was a staunch devotee of Vishnu. It is believed that once Vishnu came out of the river Krithimala as a  fish (Matsya avatar, one of the avatars of Vishnu) to teach Vedas to the ruler. From then on, the Pandyas started having fish as the symbol of the kingdom. Religious practices

The temple follows the traditions of the Tenkalai sect of Vaishnavite tradition and follows the Vaikasana aagama. In modern times, the temple priests perform the puja (rituals) during festivals and on a daily basis. As at other Vishnu temples of Tamil Nadu, the priests belong to the Vaishnavaite community, the Iyengar community. The temple rituals are performed six times a day: Kalasanthi at 8:00 a.m., Uchikalam at 12:00 p.m., Sayarakshai at 5:00 p.m., and Aravanai Pooja at 6:00 p.m. Each ritual has three steps: alangaram (decoration), neivethanam (food offering) and deepa aradanai (waving of lamps) for both Koodal Aḻagar and Mathuravalli. During the last step of worship, nagaswaram (pipe instrument) and tavil (percussion instrument) are played, religious instructions in the Vedas (sacred text) are recited by priests, and worshippers prostrate themselves in front of the temple mast. There are weekly, monthly and fortnightly rituals performed in the temple. The fourteen day annual Brahmotsavam during the Tamil month of Vaikasi (May - June) is the most prominent festival of the temple. The festive images of the temple are brought in chariot round the streets of the temple in various mounts during all the fourteen days. 