At times Shi'ism acted as an institutional force buttressing political power – as in the Buyid period (the ninth century, often known as the “Shi'i century”), and more emphatically during the Safavid period, when the majority of the population converted to Shi'ism, and the Qajar period (1785–1925), when the state incorporated symbols of Shi'i identity. At other times it contested political power, for instance when it resisted the Ash’arite Sunni orthodoxy in the Saljuqid era (eleventh and twelfth centuries) or when the powerful Shi'i clerical establishment resisted, though did not subvert, the Qajar state, and during most of the Pahlavi period (1925–79). The correlation is not accidental. Shi'ism proved itself capable of operating in more than one mode accommodating power when necessary, and even legitimizing it, or adversely rebelling against it by resorting to a vast reservoir of memories of suffering and resistance. It is of course arguable how far beyond the blanket label of Shi'ism one can draw a common doctrinal thread among many disparate currents in over a millennium of Iranian Shi'i experience. This is a formidable challenge, though not entirely impossible. Doubtless, there is a sea of difference between the legalistic Shi'ism of the madrasas of Najaf, Isfahan, and Qom, and the radical Shi'ism of the Alamut. Like any other religious experience Shi'ism evolved over time and adjusted to different climates and circumstances. Yet the ninth-century Shi'i theologian Ja'far Tusi and the thirteenth-century great Shi'i scientist, philosopher and statesman Nasir al-Din Tusi had more in common than just their birthplace. One can also draw a comparison between two Shi'i revolutionaries: the twelfth-century Hasan Sabbah, the Old Man of the Mountain, who founded the Alamut counter-state and the twentieth-century Ayatollah Khomeini, the founder of the Islamic Republic – a comparison that goes beyond the fact that the former was born in Qom (and initially was a Twelver Shi'i) and the latter spent many years of his life in Qom teaching a kind of philosophy that Nasir al-Din Tusi first contemplated while studying in the library of Alamut castle.