Mappilas are but one among the many communities that forms the Muslim population of Kerala.[134][135] According to the Legend of Cheraman Perumals, the first Indian mosque was built in 624 CE at Kodungallur with the mandate of the last the ruler (the Cheraman Perumal) of Chera dynasty, who converted to Islam during the lifetime of Prophet Muhammad (c.