The Cheraman Juma Mosque (Malayalam: ചേരമാൻ ജുമാ മസ്ജിദ്‌) (Arabic: مسجد الرئيس جمعة) is a mosque in Methala, Kodungallur, Thrissur in the Indian state of Kerala. A legend claims that it was built in 629 CE, which makes it the oldest mosque in the Indian subcontinent which is still in use. It was built on the orders of the successor of Cheraman Perumal, the Chera King of modern-day Kerala. The mosque was constructed in Kerala style with hanging lamps, making the historicity of its date claims more convincing. The mosque was destroyed by the Portuguese in 1504 when Lopo Soares de Albergaria attacked the port of Kodungallur. The old building was built some time after the 1504 de Algabaria attack (i.e., from mid-16th to the early 17th century). Modern corridors and halls were built in 1984. The 1984 extensions, which surround the old building, conceal almost all of the exterior features of the old building. History According to some legends, Cheraman Perumal ("Cheraman Perumal" being the title held by Chera kings) witnessed the splitting of the moon, a supernatural event mentioned in the Quran as a miracle performed by Muhammad when asked for one by Meccan unbelievers. The bewildered King confirmed with his astrologers that the incident had taken place, but didn't know what to make of it. Arab merchants who had arrived at a Malabar port, a bustling global marketplace, sought audience with the King to have his permission to visit Ceylon. In conversation with them, the King learnt about Muhammad, made his son the regent of his kingdom and travelled back with the Arab merchants to meet the man himself. The story goes that Cheraman Perumal arrived in Arabia with a gift of ginger pickles for Muhammad and his companions and converted to Islam "at the feet of Prophet Muhammad". According to historian M.G.S. Narayanan, "there is no reason to reject the tradition that the last Chera king embraced Islam and went to Mecca, since it finds its place not only in Muslim chronicles, but also in Hindu brahmanical chronicles like the Keralolpatti, which need not be expected to concoct such a tale which in no way enhances the prestige of the Brahmins or Hindu population." The history of the mosque has given it many architectural quirks including that since it was a repurpose Buddhist shrine, until its reconstruction in 1000 CE the mosque faced East instead of towards