of history once generated much debate among South Indian historians. The legend was used by Kerala chiefdoms for the legitimation of their rule (most of the major chiefly houses in medieval Kerala traced its origin back to the legendary allocation by the Perumal). According to the legend, Rayar, the overlord of the Cheraman Perumal in a country east of the Ghats, invaded Kerala during the rule of the last Perumal. To drive back the invading forces the Perumal summoned the militia of his chieftains (like Udaya Varman Kolathiri, Manichchan, and Vikkiran of Eranad). The Cheraman Perumal was assured by the Eradis (chief of Eranad) that they would take a fort established by the Rayar. The battle lasted for three days and the Rayar eventually evacuated his fort (and it was seized by the Perumal's troops). Then the last Cheraman Perumal divided Kerala or Chera kingdom among his chieftains and disappeared mysteriously. The Kerala people never more heard any tidings of him. The Eradis of Nediyiruppu, who later came to be known as the Zamorins of Kozhikode, who were left out in cold during allocation of the land, was granted the Cheraman Perumal's sword (with the permission to "die, and kill, and seize"). According to the Cheraman Juma Mosque and some other narratives, "Once a Cheraman Perumal probably named Ravi Varma was walking with his queen in the palace, when he witnessed the Splitting of the moon. Shocked by this, he asked his astronomers to note down the exact time of the splitting. Then, when some Arab merchants visited his palace, he asked them about this incident. Their answers led the King to Mecca, where he met Islamic prophet Muhammad and converted to Islam. Muhammad named him Tajuddin or Thajuddin or Thiya-aj-Addan meaning "crown of faith". The king then wrote letters to his kingdom to accept Islam and follow the teachings of Malik bin Deenar". It is assumed that the first recorded version of this legend is an Arabic manuscript of anonymous authorship known as Qissat Shakarwati Farmad. The 16th century Arabic work Tuhfat Ul Mujahideen authored by Zainuddin Makhdoom II of Ponnani, as well as the medieval Malayalam work Keralolpathi, also mention about the departure of last Cheraman Perumal of Kerala into Mecca. Prehistory A substantial portion of Kerala including the western coastal lowland and the plains of midland may have been under the sea in ancient times. Marine fossils