Scheichülislam
Already some of the last Safavids, Sulayman Shah (r. 1666–1694) and Tahmasp II (r. 1722–1732) had sought the ulama's support in an attempt to strengthen their authority. Particularly, they associated themselves with a group of ulama who supported the "official" Twelver Shi'a doctrine, established by the Iranian Shaykh al-Islām Mohammad-Baqer Majlesi (1627–1699) during the later decades of Safavid rule. The dispute between the Twelver Shi'a and Mir Damad's (d. 1631 or 1632) and Ṣadr ad-Dīn Muḥammad Shīrāzī's (c. 1571/2 – 1640) School of Isfahan, who promoted Sufi mysticism and Islamic philosophy, continued throughout the 18th century, and shaped the relationship between ulama and government during the reigns of the subsequent dynasties.