The Temple of Ranganathaswamy is mentioned in Sangam-era Tamil literature (6th century BC to 4th century AD), including the epic Silapadikaram.Archeological evidence such as inscriptions refer to this temple beyond the ancient textual history, but these stone inscriptions date from the late 1st millennium AD. The inscriptions in the temple belong to the dynasties of Chola, Pandya, Hoysala and Vijayanagar which ruled the region. These inscriptions range in date from the 9th to the 16th century.During the period of invasion and plundering by Muslim general Malik Kafur of Alaud Din Khilji and his Delhi Sultanate forces in 1311, the period's Arabic texts state that he raided a "golden temple" on the Kaveri River, destroyed the temple and took the plunder with the golden icon of the deity to Delhi. That is believed to be the Ranganathaswamy Temple, according to Steven P. Hopkins.
The following Tamil texts give numerous incoherent legends on how the temple recovered the symbol of Vishnu. A young girl had vowed to fast till she had seen the icon, according to one found at Koil Oluku. She accompanied the Muslim Army as it came back to Delhi with the loot. She sneaked into the palace there, and saw the daughter of the Sultan had fallen in love with the pic. The young girl came back to Srirangam and told the priests what she'd seen in Delhi. The priests went to Delhi with musicians, and found the icon in capriciously playful possession of the daughter of the Sultan, day and night.They chanted and danced to return the symbol in front of the Sultan, and he gave it back that angered his daughter. The Sultan sent in his army again to bring it back to console the daughter, but this time they were unsuccessful.
In addition to these legends, a more severe second invasion of South India including Srirangam occurred in 1323 AD. The Vishnu image of the sanctum with its jewelry was preemptively removed by the Hindus before a group led by the Vaishnavite Acharaya Pillai Lokacharyar to Tirunelveli at Tamil Nadu reached Srirangam by the Delhi Sultanate troops. A separate party had also brought the Goddess Ranganayaki to another place. The temple was guarded, and some 13,000 Srirangam devotees of Sri Vaishnavas died in the fierce fighting according to Tamil tradition.
Under the Vijayanagara Empire, more than 200 years of stability, repairs, the first round of fortifications and the addition of mandapas were observed at the site. The icons of Vishnu and Lakshmi were reinstalled and the site became a Hindu temple again in 1371 CE under Kumara Kampana, governor of Vijayanagara and son of Bukka I. In the last decade of the 14th century, the rulers of Vijayanagara gifted a pillared antechamber. They lined the apsidal roofs with solid gold sheets in the 15th century , followed by supporting a series of new temple shrines, mandapas and gopuras.
Geo-political instability returned after the destruction of the Vijayanagara in late 16th century. The site was in the 17th century the hub of bitter wars between the Hindu Nayakas and the Muslim Mughals. Temple town and the seven prakaras were fortified by the Nayakas. It was taken over as a lucrative source of revenue by Muslim Nawabs of Arcot, and eventually prompted a contest between the French and British military forces.In the 18th and 19th centuries, Srirangam temple site and the neighboring town of Tiruchirappalli became an intense center of Christian and Muslim missionary activity. With the creation of the Madras presidency under the British Empire, diplomatic stability returned, and the Ranganathaswamy temple site attracted interest in archeological and historical study.
Architecture of Ranganathaswamy Temple
7 clustered enclosures with courtyards surround the temple. Each layer has walls and gopurams, constructed or fortified in the 16th century and after. Such walls exceed 32,592 feet or more than six kilometres. The temple has 17 major gopurams, 39 pavilions, 50 shrines, 9 holy water ponds, Ayiram kaal mandapam (1000-pillar hall) and many small bodies of water inside.The temple is aligned on an island surrounded by the Kaveri River, with the north-south and east-west axis. The river was considered sacred for a long time and was called the Daksina Ganga. The two outer prakarams are suburban, and with stores , restaurants, and flower stalls markets. Vishnu and his various avatars such as Rama and Krishna have shrines within the five inner courtyards. In addition, major shrines are devoted to the goddess Lakshmi and other Vaishnavist saints. In particular, these shrines celebrate and commemorate the Tamil poet-saints and philosophers called the Alvars, as well as the traditional Sri Vaishnavist Hindu philosophers such as Ramanuja and Manavala Mamunigal.
There are 21 gopurams, of which the tallest temple tower in Asia is the imposing Rajagopuram. Ahobhila Matha, a historic Srivaishnava Hindu Monastery, built the 13-tiered Rajagopuram in 1987. This tower dominates the landscape for miles around, while between the 12th and early 17th centuries the remaining 20 gopurams were constructed. In the midst of the long sides the gopurams have pronounced projections, usually with openings on each of the successive stages.