Madayi Mosque (Malayalam: മാടായി പള്ളി, Matayi Palli; Pazhayangadi Mosque) is mosque at Pazhayangadi in Kannur district, northern Kerala. It is one of the oldest mosques in Kerala, with local legends dating back to the 7th century AD. It is believed to have been established by Malik ibn Dinar and contains a block of white marble said to have been brought from Mecca by ibn Dinar. It is one of the several mosques around Pazhayangadi/Payangadi. It is situated on the banks of Kuppam River, which joins Valapattanam River at its estuary.

The local legends, both Islamic and Hindu, say of the arrival of Malik ibn Dinar and his company with them royal letters from the Ceraman Perumal [the last king of the Cera Perumal Kingdom, c. 1089- 1122 AD] to different native chiefs seeking their assistance to the missionary activities and establishment of mosques. The mosque is a former Hindu temple dedicated to God Subramanya. Hindu inscriptions can still be seen on the pillars and base walls of the mosque. 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.

According to the Legend of Cheraman Perumals, the first Indian mosque was built in 624 AD 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. 570–632). According to Qissat Shakarwati Farmad, the Masjids at Kodungallur, Kollam, Madayi, Barkur, Mangalore, Kasaragod, Kannur, Dharmadam, Panthalayini, and Chaliyam, were built during the era of Malik Dinar, and they are among the oldest Masjids in the Indian subcontinent.  It is believed that Malik Dinar died at Thalangara in Kasaragod town. The Arabic inscription on a copper slab within the Madayimosque in records its foundation year as 1124 CE. The 16th century Tuhfat Ul Mujahideen also states about Madayi.

The mosque contained a marker/plaque listing (Arabic inscription) the year 1124 AD (H. 518) as the date of its construction. As a part of renovation, the old structure was pulled down in 2006, and a new structure in Indo- Saracenic model has been built on the old foundations. The marker is preserved and incorporated into the floor of the new building, but the original date is no longer legible. The presence of the plaque is also attested by William Logan, District Collector and Magistrate, Malabar District.

Madayi Mosque Inscription

"In the name of God, the Most Gracious, the Most Merciful. The mosques of God shall be visited and maintained by such as believe in God and the Last Day, establish regular prayers, and pay zakat, and fear none except God. It is they who are expected to be on true guidance. Dated on the 5[18]th year on Friday of Rabiul Akhir"

At the rear of the mosque an old wall has been retained incorporating the original mark of the qibla, while beside it stands the first pulpit (mimbar), a simple and visibly ancient raised stone platform. The second mimbar, also old, has been retained in the new mosque. It has four carved wooden posts holding up a flat canopy that is covered with painted flowers on its interior.

The graves of two saints said to have been companions of Malik ibn Dinar have been consigned to a rear room. There were some big offerings for the Madayi Mosque from the sailors and travellers without the consideration of their religion.

Other names
 Matayi Palli/Mosque
 Malik ibn Dinar Mosque, Madayi
 Pazhayangadi Mosque

References 

Mosques in Kerala
Mosques completed in 1124
Mosques completed in 2006
Religious buildings and structures in Kannur district