It has been seen that Shi'i Islam denied legitimacy to secular power, and the occultation of the Imam removed all real authority from the sphere of this world. With the establishment of the Safavid state in 1501, the denial of legitimacy became partially obscured by the claim of the monarch to descent from the Imams and by the introduction of Sufi motives into the concept of rulership. At the same time, a body of Shi'i ulama emerged who, although equally deprived of ultimate authority, gradually acquired, through the exercise of a practical function, a de facto authority within the community. This development in their position was furthered by the fall of the Safavids and their replacement, after an interregnum, by the Qajars in the last quarter of tbe eighteenth century. By the end of the interregnum, relations between the state and the ulama bad been changed by two new factors. First, there took place an evolution in Shi'i fiqh which asserted the role of the mujtahid in directing the community and even in ruling it. One of the ulama, Shaykh AlJmad Ardabilr, indeed reminded his monarch, Shah 'Abbas, that he was ruling over a "borrowed kingdom", but the ulama in the Safavid period did not openly contest the legitimacy of the state. Second, the establishment of Qajar rule presented the ulama with the spectacle of a state that made many of the same assumptions concerning the nature of royal power as had the Safavids but was itself deprived of the semilegitimacy provided by alleged descent from the Imams. The Qajars called themselves "Shadow of God," but the claim to divine appointment was only formal. Thus it might have been thought that some attempt would be made to justify, in religious terms, tlie claims of the state to the allegiance of its subjects.