The Christians who had arrived from the Middle East in the 3rd century AD and the Muslims who arrived in the 8th century were generally traders and were not involved in this social segregation and generally kept aloof from the ambit of caste politics of those days. The Jews who arrived in Kerala in the early years of the Christian era were given privileges to trade and became an influential part of the melting pot of Kerala's population.
The Namboothiries also were the landowners ( janmi) of most lands in Kerala. Lands being leased out to next higher castes for sharecropping, and these, in turn, would further be leased out to those lower on the caste hierarchy and to non-Hindus. The lowest castes, of course, were only labourers and were traded along with the land. In such a rigid hierarchy, the all-powerful Namboothiries were the unquestioned rulers.
By and by Kerala entered a phase of feudal chieftains or warlords (Naduvazhis). Some were anointed by the Namboothiries, but most just walked into a power vacuum existing at the time. Hence, Kerala at the turn of the 11th century AD had a power triangle in the caste system supported by the Landlords and ruled by the warlords. This, in turn, gave rise to instability in the absence of strong central leadership. Wars and conflicts were common for control of turf.
Ultimately three warlords emerged with some semblance of authority in their regions - the Zamorin of Calicut (Samuthiri of Kozhikode) to the North, Moopins of Perimpadappu (near modern-day Kochi) in the central regions and chieftain of Kollam.
It is also interesting to note that these kingdoms are centred around the ancient ports of Kozhikode, Kochi ( a small harbour appeared in present-day Kochi in 1341 after a natural calamity closed the ancient port of Muziris or Kodungalloor. The name Kochi comes from the word Kochu though meaning small port or opening out to the sea !), and Kollam. The combination of caste, feudalism and warfare ultimately took its toll. The landlords lived in supreme luxury, while the peasantry toiled to keep them in comfort. The endless feuds also impoverished the countryside. When Kerala was ripe for the picking.
This is precisely what the Europeans who found a sea lane to the fabled land of spices and gold did. There was nothing anyone could do to stop the next five centuries of colonial rule!