The family of chieftains that ruled the polities in premodern Kerala was known as the swaroopam. The rulers of Kozhikode belonged to "Nediyirippu swaroopam" and followed matriliny system of inheritance. The eldest male member of Nediyirippu swaroopam became the Samoothiri of Kozhikode. There was a set pattern of succession, indicated by sthanams in the royal line. Five sthanams were defined in Kozhikode. These positions were based on the chronological seniority of the incumbent in the different thavazhis of the swaroopam and constituted what is called in the records as "kuruvazhcha". Unlike in the case of Cochin (Kochi), there was no rotation of position among the thavazhis. Thus no particular thavazhi enjoyed any privilege or precedence in the matter of succession, as the only criterion for succession was seniority of age.