Primeval history of Lakshadweep is unrecorded. What now passes for history is based on various legends. Local traditions attribute the first settlement on these islands to the period of Cheraman Perumal, the last king of Kerala. The advent of Islam dates back to the 7th century around the year 41 Hijra. The Portuguese also ruled the islands for a number of years.