This study looks at the process of the founding of territorial states in Tunisia and Morocco between the 17th and 19th century. Specifically, it examines the institution of the Bay`a (a pledge of allegiance), which entailed a centralized legitimate authority, and provided the main entry for improving consensus-building mechanisms and the alignment of society and politics in both countries. Given that the Baya did not always follow the same rituals, or employ the same social hierarchies, the author offers a comparison of practices specific to the Bay`a in both countries. In comparing the experiences of territorial state building and its assimilation processes, Haniya provides important epistemological and methodological insights into the subject and describes the emergence of two different state-building models. Haniya explains how centralization in Tunisia was primarily based on assimilated urban elites and public figures in the capital, providing strong support for the central authority while working to weaken local forces. He also describes how the state was gradually able to transform itself from an authority practicing sovereignty over an undifferentiated mass to a state that rules over a group of individuals to finally establishing a territorial state. In contrast, Morocco during that period was defined through loyalty to the Sultan. Unlike Tunisia, the central authority in Morocco did not seek to weaken other sources of influence in Moroccan society, and has worked to nurture these local groups as they provided for the continuation of the Bay`a in present Morocco.