There appears to be no doubt that under the Nayakkan Kings of Madura the seven temples in and in the immediate neighbourhood of the capital were endowed with large revenues derived from a number of villages. The temples were known as the Hafta Devasthanam, and included the Tirupparankundram Temple. It seems probable that this endowment was due mainly to the generosity of Tirumala, a famous member of that dynasty who reigned from 1623 to 1659. During the century and a half that followed the history of Madura is a confused record of internecine warfare, in which the incursions of Mahomedan, Mysorean and Mahratta invaders played the largest part, and these were succeeded by the gradual, but by no means peaceful, penetration of the East India Company. During those troublous times the Hafta Devasthanam lands seem to have disappeared piecemeal. What remained of them when Chanda Sahib, nominally representing the Nawab of Arcot, established himself in Madura in 1738 were then confiscated. His domination was interrupted by another invasion of the Mahrattas, who probably restored a portion of the old endowments. They again were ousted by the Nizam in 1744, and the temples fared no better than before. Then followed the intervention of the East India Company. Madura was eventually subdued by their troops under Mahomed Yusuf Khan, who in due course established himself as ruler. In 1763 he was beseiged in Madura by the Company's army, and after a memorable defence was betrayed and executed.