The early history of Kerala is very complex and there are many problems remaining to be resolved by historians. The history of the Nambudiri community still presents a number of puzzles. According to the legendary Keralolpatty (a traditional account of Kerala history, set down in writing in the eighteenth century), Brahmans were brought to the southwest coast of India by the sage-warrior Parasurama, and they settled in thirty-two grammam (from Sanskrit grama, "Community") in the South Kanara District of Karnataka State and in thirty-two grammam in what is now Kerala. Those who settled in Kerala are said to be Nambudiri Brahmans. Each grammam had its own temple and its own set of authorities for religious and secular law and its enforcement. Most of the grammam were localized geographically with their illams (large manorial homes) located within a 16- to 40-kilometer radius of the temple. However, the territory of one grammam might overlap that of another, as they were not communities in the usual sense. There is considerable argument among historians as to when the Nayars became matrilineal, some stating that this started in the tenth century A . D . and others seeing it as being rooted either in an earlier tribal matrilineal system or perhaps in an earlier bilateral system such as is found in Sri Lanka. There is some evidence from their customs and from physical characteristics that the Nambudiris came from outside the area.
The heyday of the Nambudiri system was between the twelfth and the seventeenth centuries. The majority of Modern historians hold that they came to Kerala between the first and fourth centuries A . D ., though there are some—such as E. K. Pillai—who believe they came later. Prior to the British, in some parts of Trichur Taluk (subdistrict) of Cochin State, which had the densest Nambudiri concentration, the area was ruled by the heads of the Vadakunnathan and Perumanam temple boards. Where they did not rule directly, or where their rule was weak, they would align themselves with different matrilineal rulers. When the Zamorin of Calicut was expanding his kingdom, he needed the allegiance of the heads of the two largest temple boards of Cochin to capture power. When the Maharaja of Cochin recaptured part of his kingdom, he had to break the power of the Nambudiri illams in Trichur.
Apart from their direct political control, Nambudiris were often able to exercise considerable indirect power Because of their status as the highest spiritual authorities in Kerala.