From earliest times, religion has always been one of the most important factors in social cohesion and at the same time a major cause of urban factionalism and strife. The existence of opposing sects in the same city has invariably provided a breeding ground for economic, social, and political differences in the guise of sectarian disputes.
The basic elements of urban organization in the Islamic period were local government (ḥukūmat), religious solidarity (ummat), professional associations (the craft guilds, aṣnāf), and the city wards or quarters (maḥallāt). Occasionally, other social organizations rose to prominence such as esoteric fraternities, mystical and dervish orders, and chivalrous and paramilitary associations (futuvvat, Cayyārān); these too formed part of the overall social life of the city. The wards or city quarters were the centers of group activity based on kinship, or ethnic or sectarian affiliation. Iranian cities during the Islamic period saw political and social activities by the followers of the four rites of the Sunna--Shāfiᶜī, Ḥanbalī, Ḥanafī, and Mālikī--and by Shi'ite and other dissident sects such as the Zaydīs, Carmathians, Mu'tazilites, and Ismāᶜīlīs.