The succession of the monarchs was never based solely on primogeniture, as both the "Sena" (a council which could include senior royal family members, ministers, and generals) and Sangha (senior members of the clergy) would choose a suitable successor based on both legitimacy and individual merit. The state bureaucracy as originally designed by Fa Ngum and Samsenthai was along a military structure which included some social mobility through meritocracy. Over time however social distinctions became more entrenched and the bureaucracy became based on hereditary title. The political institutions in Lan Xang created disputes and instability especially during royal successions.