Pandyan I fought and defeated the Hoysala King Vira Someshwara as attested by his inscription at the Sri Ranganathaswamy Temple in Srirangam. There are also Pandya inscriptions from the reign of Maravarman Kulasekhara I, Jatavarman Sundara Pandya II and Maravarman Kulasekhara II. In 1310, the Pandya king, Maravarman Kulasekara Pandyan I was murdered by his son Sundara Pandya who ascended the throne. But he was overthrown shortly afterwards by Vira Pandya, an illegitimate son of Maravarman Kulasekhara I. Sundara Pandya sought refuge in the court of Delhi and invited the Muslim general Malik Kafur to invade the kingdom offering him all assistance possible. Malik Kafur invaded the Pandya kingdom in 1311. Muslim annals describe it as the campaign against 'the country of the yellow-faced Bir'. Vira Pandya was defeated at Kannanur and the temple of Srirangam was ransacked. According to a popular legend, the idol of Ranganatha was captured and taken by the victors to Delhi where a young daughter of the sultan Alauddin Khalji grew fond of the idol and used it as a plaything thereby saving it from apparent destruction. A group of devotees of the temple, meanwhile, travelled all the way to Delhi and managed, in the absence of the princess, to persuade the sultan to grant the idol to them. The princess grew distraught on discovering that the idol had vanished and led a search party to recover it. However, the devotees had crossed Tirupathi by the time. On getting to know of the search party sent after them, three of the most ardent devotees of the god volunteered to take the idol to a cave in the middle of a sparsely-inhabited jungle and guard it there. The idol is believed to have remained in the cave for more than fifty-nine years, until Kampanna Udaiyar's conquest of Srirangam in 1371, when the sole-surviving member of the trio, now in his eighties, conveyed information about the idol to the authorities in Srirangam through the jungle tribes he lived with. Meanwhile, a substitute idol had been installed in the Srirangam temple in 1311 and worship to this idol was continued after the Muslim army withdrew. When the forces of the sultanate invaded again in 1327, the replacement idol had to be moved to safety. The idol was, therefore, moved to Madurai and across the Western Ghats to Travancore, finally ending up at Tirupathi. When in 1371, Kampanna began