From the standpoint of Fiqh the ideal society is theocracy, in which the political as well as the spiritual power is in the hands of the religious leaders. Even by Umayyad times, however, theocracy had faced true obstacles, and the state was in reality secular. Meantime the Muhaddith and the Faqih clung obstinately to their ideal, with the result that the theory of public law which they evolved ignored the flow of history. It did not envisage a real Muslim state at all, but the state as it ought to beaccording to the zealots. Consequently the Muslim theory of the state is the province of theologians, and has something highly artificial about it. These divines contemplated a Caliphate based on the unyielding principles of religion, given once and for all, immutable; they did not deign to take stock of the changes that were driving society along feudal lines. The gap between Fiqh and actual conditions went on widening. The Koran gives no instructions how to build the state; and it does not mention the Caliph. The office of the latter as Muhammad's deputy arose from the need which the governing set experienced of a central control strong enough to retain power over the massthe Bedouin, the land-owners and the townspeopleand also to propel it against the Byzantine and Iranian provinces. The Caliph's authority from the very start was religious in so far as he was Imam, political in so far as he was Amir, but nobody had any clear conception of the range of his responsibilities. This only emerged as the early feudal state of the Arabs itself developed. Indeed the elaboration of the theocratic theory went on for several centuries. In an endeavour to associate it with the Koran, the divines built the theory on the verse: 'Believers! Obey God, obey his Messenger and the holders of power among you.' The utterance here about power is vague enough; but the commentators, especially Baydawi, take 'holders of power' to mean the Imam-Caliph, the divines competent to expound the Shari'a, the Qadis, and the Captains in Holy War.
The most authoritative work on Sunni public law containing the legal theory of the Caliphate was by common consent Al-Ahkamu's Sultaniyya ('Laws of Government') by the Shafi'ite jurist al-Mawardi, Abu 'l-Hasan 'All b. Muhammad, 974-1058. It was written in Baghdad when the Caliphate was no longer a single state, but had given place to a number of feudal dominions, and when the orthodox 'Abbasids retained only a shadow of spiritual authority and no political authority whatever: this having been seized by the 'Amirs of the Amirs' of the Iranian Daylamite dynasty, the Buwayhids (in Persian Al-i Buviye), 945-1055. What Mawardi pictures is not an existing state but an ideal theocracy; 'he is describing' says Brockelmann 'the ideal of Muslim public law which had possibly never existed, and in any case did not exist in his own day'. Mawardi considers the Caliphate an institution established by God himself for the protection of the Faith and the guarantee of a just administration in the world. The Caliph combines in his person the spiritual power of the Great Imamate (al-imamatu 'l-kubra)and the political power of the Amirate (imara, from the root amara 'to command'; whence the title amiru 'l-mu'minin, Commander of the Faithful) inherited by him in succession from the Prophet. There can be only one Caliph (or Imam in the sense of Great Imam) at a time, and his authority extends to the entire world; and it follows that the united Muslim state must sooner or later become a universal state, all the infidels having submitted to the Muslims.