 The Madayi Mosque was built with the assistance of the Kolattiri Raja to whom also there was a letter from the last Cera Perumal.According to Shaikh Zain ud-Din Makhdum, the first "qadi" of the new mosque was Malik ibn 'Abdu Rahman.The mosque contained a marker/plaque listing (Arabic inscription) the year 1124 AD (H. 518) as the date of its construction.