When this mosque was constructed for the soldiers of the erstwhile princely state of Travancore over two centuries ago, it was a tiny thatched roof structure sans domes and minarets.
Sharing border with a Hindu shrine, it offered Muslim members of the royal army a place to offer their prayers and 'eidgah' near their cantonment in the capital city.
When it had metamorphosed into the present magnificent structure over decades, the 'Juma Masjid' at Palayam here now woos even non-Muslims with its unique iftar feast and secular gatherings during the month of Ramadan.
Cutting across religious barriers, local people including officials of the nearby state Secretariat, drivers, traders, travellers and passers-by, throng the centuries-old mosque during evenings of the holy month.
Complete adherence to green protocol and distribution of "oushadha kanji, a unique medicinal porridge prepared and served in an eco-friendly manner, make the iftar of this "pattalappalli" unique.
The Palayam Juma Masjid was once known as 'pattalappalli' (military mosque) in local parlance as it was made for the Travancore Army.
According to the mosque's management, over 900-1200 people including non-muslims relish this delicious and nutritious 'kanji' every day of the holy month.
Located in the heart of the city, the masjid also offers special facility for women for 'namaz' (prayers) and breaking the fast in its premises.
Quoting records, Moulavi V P Suhaib, Palayam imam, said his masjid was constructed in 1813 and the practice of social iftar could be dated back at least to a century.
"The present masjid was just a thatched-roof building when it was constructed in 1813 AD.It was reconstructed and developed into the present structure in 1960s," he told PTI.
For the past several decades, the Palayam Masjid has been a landmark pilgrim centre of Muslim fraternity here and a perfect example of secularism as it has a Hindu shrine on one side and a Christian church on the other side of the road.
The imam said the masjid opens its portals cutting across religion to taste it's delicious'nombukanji' during Ramadan month.
"We serve at least 1,200 plates of kanji every day. Besides rice and ghee, over 20 ingredients including dates,pepper, cardamom, cinnamon, cloves, turmeric, fenugreek, coriander, garlic, fennel, cumin, pineapple, tomato and so on make this delicacy a healthy diet," he said.
A seasoned cook prepares the kanji in wood fire kilns in eco-friendly utensils in the mosque premises. Later, it is served in steel bowls and plates at the attached community hall in the evening.
After breaking the fast using dates and fruits followed by a customary namaz, the devotees are served with the medicinal kanji either with tappiyoca or green gram.
"We adhere to the green protocol completely during iftar. We don't use any kind of plastic articles while preparing and serving the kanji. We avoid plastic completely and use steel utensils only," he noted.
The iftar kanji won't be given even to those who come with plastic carry bags or utensils to collect it to take home, he added.
According to historians, the Travancore royals, who ruled the princely state of Travancore (present Kerala),had aided in the construction of the mosque for their army men.
The masjid was built for the Muslim members of the armyafter a temple, dedicated to Lord Ganapathy, was built nearby for Hindu soldiers.
Palayam, where the mosque and the temple are located adjacent to each other, had got it's name due to the presence of the camp of royal army there.
'Palayam' means army cantonment in local parlance. The juma masjid also had the 'khabar' (grave) of eminent Indian-English writer Kamala Das who had embraced Islam andaccepted the name Surayyiah in the later years of her life.
She, who died in 2009, was buried at the shady khabaristan', the burial ground, behind the masjid.