Erumbeeswarar Temple, Thiruverumbur, near Trichy and failed Muslim invasion in the early 1300s CE

 Erumbeeswarar Temple (Malai kovil),  atop a hill (60 ft tall) in Thiruverumbur,  near Tiruchirappalli city, is a popular one  and it dates back to 7th or 8th century. It is a rock-cut temple dedicated to God Shiva who is in the form of linga - Swayambhu - self-manifested from a molehill in the sanctum.  There is a separate shrine for the goddess - Soundara Nayaki.  The temple can be accessed by a series of carved stone steps and the temple outer walls appear like a fort.  The inner prakaras in the temple have stone inscriptions covering many dynasties Chola, Pandya and also Vijayanagar. This temple was once worshipped  by  Thirugnanasambandar as mentioned by Sekkizhar in Periyapuranam. 

Damaged temple, 100s CE. Malai Kovil near Tiruchirappallifirstpost.com

Built by Aditya Chola I in the 9th century, it is under the control of the ASI and  is being  managed by the TN state agency HR & CE.  An important history of this temple is  the Delhi Sultanate Army Commander  Malik Kafur,  a  Muslim convert, and an efficient military commander in the army of Alauddin Khilji of Slave Dynasty, Delhi.  In the early part of 1300s he raided Srirangam and Madurai temples to loot the treasures and caused widespread destruction and chaos. The temple agt Madurai suffered a lot.  Kaufer  made the Pandya kingdom bleed, causing widespread damages to the temple and the city. . He  returned to Delhi with countless bags of loot -  mostly valuable stuff, gold coins, gemstones, etc. The Muslim army came to Tamil Nadu at the wrong invitation of help by the warring brothers of the Pandya king, according to many historians. 

Erumbeeswarar Temple in Thiruverumburen.wikipedia.org

Malik Kafur, as part of war campaign in  this region, had set his eyes on the  Erumbeeswarar Temple (Malai kovil), atop the  hill (60 ft tall) in Thiruverumbur. When he attacked the temple, the Chola army forces gave him tough defence and finally drove the Sultanate army out of this place. The chola forces used the high  boundary walls of the temple and launched the attack when the Sultanate army men were trying tp climb the hill. It was a tense moment in this part then and Malik Kaufer, a treacherous warrior, after his vein attempt, proceeded down south for additional plundering of Hindu temple for treasures.    The Chola ruler and the army never gave him any chance and  drove him out of the kingdom.  The fort-like structure of the temple was ingeniously used by the Chola army men and prevented a large scale invasion. 

Islamic invasion, S.India 1300s civils.pteducation.com

 Today in the temple complex atop the hill one can see damaged structures, pillars, etc.  It was the only temple that Malik Kafur (1296-1316 CE) could not conquer in 1311 CE, during his South Indian expedition.  In the later years, when there was a tough competition between the British and French companies during 1752, the temple  served  as an infantry for the French troops.

https://www.firstpost.com/living/indias-disappearing-history-while-asi-looks-the-other-way-monuments-being-razed-for-public-interest-2886166.html