History of Iran
The history of Iran (historically known as Persia in the West) is intertwined with the history of a larger region known as Greater Iran, comprising the area from Anatolia in the west to the Indus river and the Syr Darya in the east, and from the Caucasus and the Eurasian Steppe in the north to the Persian Gulf and the Gulf of Oman in the south. Central to this area is Iran, commonly known until the mid-20th century as Persia in the Western world. Iran is home to one of the world's oldest continuous major civilizations, with historical and urban settlements dating back to 4000 BC. The south-western and western part of the Iranian plateau participated in the traditional ancient Near East with Elam (3200–539 BC), from the Bronze Age, and later with various other peoples, such as the Kassites, Mannaeans, and Gutians. Georg Wilhelm Friedrich Hegel calls the Persians the "first Historical People". The Medes unified Iran as a nation and empire in 625 BC. The Achaemenid Empire (550–330 BC), founded by Cyrus the Great, ruled from the Balkans to North Africa and also Central Asia, spanning three continents, from their seat of power in Persis (Persepolis). It was the largest empire yet seen. They were succeeded by the Seleucid, Parthian, and Sasanian Empires, who successively governed Iran for almost 1,000 years and made Iran once again a leading power in the world. Persia's arch-rival was the Roman Empire and its successor, the Byzantine Empire. The Iranian Empire proper begins in the Iron Age, following the influx of Iranian peoples. Iranian people gave rise to the Medes, the Achaemenid, Parthian, and Sasanian Empires of classical antiquity. Once a major empire, Iran has endured invasions too, by the Macedonians, Arabs, Turks, and Mongols. Iran has continually reasserted its national identity throughout the centuries and has developed as a distinct political and cultural entity. The Muslim conquest of Persia (633–654) ended the Sasanian Empire, and was a turning point in Iranian history. Islamization of Iran took place during the eighth to tenth centuries, leading to the eventual decline of Zoroastrianism in Iran as well as many of its dependencies. However, the achievements of the previous Persian civilizations were not lost but were to a great extent absorbed by the new Islamic polity and civilization. Iran, with its long history of early cultures and empires, had suffered particularly hard during the Late Middle Ages and the early modern period. Many invasions of nomadic tribes, whose leaders became rulers in this country, affected it negatively. Iran was reunified as an independent state in 1501 by the Safavid dynasty, which set Shia Islam as the empire's official religion, marking one of the most important turning points in the history of Islam. Functioning again as a leading world power, this time amongst the neighbouring Ottoman Empire, its arch-rival for centuries, Iran had been a monarchy ruled by an emperor almost without interruption from 1501 until the 1979 Iranian Revolution, when Iran officially became an Islamic republic on 1 April 1979. Over the course of the first half of the 19th century, Iran lost many of its territories in the Caucasus, which had been a part of Iran for centuries, comprising modern-day Eastern Georgia, Dagestan, Republic of Azerbaijan, and Armenia, to its rapidly expanding and emerging rival neighbor, the Russian Empire, following the Russo-Persian Wars between 1804–1813 and 1826–1828. Prehistory

Paleolithic
The earliest archaeological artifacts in Iran were found in the Kashafrud and Ganj Par sites that are thought to date back to 10,000 years ago in the Middle Paleolithic. Mousterian stone tools made by Neanderthals have also been found. There are more cultural remains of Neanderthals dating back to the Middle Paleolithic period, which mainly have been found in the Zagros region and fewer in central Iran at sites such as Kobeh, Kunji, Bisitun Cave, Tamtama, Warwasi, and Yafteh Cave. In 1949, a Neanderthal radius was discovered by Carleton S. Coon in Bisitun Cave. Evidence for Upper Paleolithic and Epipaleolithic periods are known mainly from the Zagros Mountains in the caves of Kermanshah and Khorramabad and a few number of sites in the Alborz and Central Iran. During this time, people began creating rock art. Neolithic to Chalcolithic
Early agricultural communities such as Chogha Golan in 10,000 BC along with settlements such as Chogha Bonut (the earliest village in Elam) in 8000 BC, began to flourish in and around the Zagros Mountains region in western Iran. Around about the same time, the earliest-known clay vessels and modelled human and animal terracotta figurines were produced at Ganj Dareh, also in western Iran. There are also 10,000-year-old human and animal figurines from Tepe Sarab in Kermanshah Province among many other ancient artefacts. The south-western part of Iran was part of the Fertile Crescent where most of humanity's first major crops were grown, in villages such as Susa (where a settlement was first founded possibly as early as 4395 cal BC) and settlements such as Chogha Mish, dating back to 6800 BC; there are 7,000-year-old jars of wine excavated in the Zagros Mountains (now on display at the University of Pennsylvania) and ruins of 7000-year-old settlements such as Tepe Sialk are further testament to that. The two main Neolithic Iranian settlements were Ganj Dareh and the hypothetical Zayandeh River Culture. Bronze Age

Parts of what is modern-day northwestern Iran was part of the Kura–Araxes culture (circa 3400 BC—ca. 2000 BC), that stretched up into the neighbouring regions of the Caucasus and Anatolia. Susa is one of the oldest-known settlements of Iran and the world. Based on C14 dating, the time of the foundation of the city is as early as 4395 BC, a time right after the establishment of the ancient Sumerian city of Uruk in 4500 BC. The general perception among archaeologists is that Susa was an extension of the Sumerian city-state of Uruk, hence incorporating many aspects of Mesopotamian culture. In its later history, Susa became the capital of Elam, which emerged as a state founded 4000 BC. There are also dozens of prehistoric sites across the Iranian plateau pointing to the existence of ancient cultures and urban settlements in the fourth millennium BC. One of the earliest civilizations on the Iranian plateau was the Jiroft culture in southeastern Iran in the province of Kerman. It is one of the most artefact-rich archaeological sites in the Middle East. Archaeological excavations in Jiroft led to the discovery of several objects belonging to the 4th millennium BC. There is a large quantity of objects decorated with highly distinctive engravings of animals, mythological figures, and architectural motifs. The objects and their iconography are considered unique. Many are made from chlorite, a grey-green soft stone; others are in copper, bronze, terracotta, and even lapis lazuli. Recent excavations at the sites have produced the world's earliest inscription which pre-dates Mesopotamian inscriptions. There are records of numerous other ancient civilizations on the Iranian plateau before the emergence of Iranian peoples during the Early Iron Age. The Early Bronze Age saw the rise of urbanization into organized city-states and the invention of writing (the Uruk period) in the Near East. While Bronze Age Elam made use of writing from an early time, the Proto-Elamite script remains undeciphered, and records from Sumer pertaining to Elam are scarce. Russian historian Igor M. Diakonoff stated that the modern inhabitants of Iran are descendants of mainly non-Indo-European groups, more specifically of pre-Iranic inhabitants of the Iranian Plateau: "It is the autochthones of the Iranian plateau, and not the Proto-Indo-European tribes of Europe, which are, in the main, the ancestors, in the physical sense of the word, of the present-day Iranians." Early Iron Age

Records become more tangible with the rise of the Neo-Assyrian Empire and its records of incursions from the Iranian plateau. As early as the 20th century BC, tribes came to the Iranian plateau from the Pontic–Caspian steppe. The arrival of Iranians on the Iranian plateau forced the Elamites to relinquish one area of their empire after another and to take refuge in Elam, Khuzestan and the nearby area, which only then became coterminous with Elam. Bahman Firuzmandi say that the southern Iranians might be intermixed with the Elamite peoples living in the plateau. By the mid-first millennium BC, Medes, Persians, and Parthians populated the Iranian plateau. Until the rise of the Medes, they all remained under Assyrian domination, like the rest of the Near East. In the first half of the first millennium BC, parts of what is now Iranian Azerbaijan were incorporated into Urartu. Classical antiquity

Median and Achaemenid Empire (680–330 BC)

In 646 BC, Assyrian king Ashurbanipal sacked Susa, which ended Elamite supremacy in the region. For over 150 years Assyrian kings of nearby Northern Mesopotamia had been wanting to conquer Median tribes of Western Iran. Under pressure from Assyria, the small kingdoms of the western Iranian plateau coalesced into increasingly larger and more centralized states. In the second half of the seventh century BC, the Medes gained their independence and were united by Deioces. In 612 BC, Cyaxares, Deioces' grandson, and the Babylonian king Nabopolassar invaded Assyria and laid siege to and eventually destroyed Nineveh, the Assyrian capital, which led to the fall of the Neo-Assyrian Empire. Urartu was later on conquered and dissolved as well by the Medes. The Medes are credited with founding Iran as a nation and empire, and established the first Iranian empire, the largest of its day until Cyrus the Great established a unified empire of the Medes and Persians, leading to the Achaemenid Empire (c.550–330 BC). Cyrus the Great overthrew, in turn, the Median, Lydian, and Neo-Babylonian Empires, creating an empire far larger than Assyria. He was better able, through more benign policies, to reconcile his subjects to Persian rule; the longevity of his empire was one result. The Persian king, like the Assyrian, was also "King of Kings", xšāyaθiya xšāyaθiyānām (shāhanshāh in modern Persian) – "great king", Megas Basileus, as known by the Greeks. Cyrus's son, Cambyses II, conquered the last major power of the region, ancient Egypt, causing the collapse of the Twenty-sixth Dynasty of Egypt. Since he became ill and died before, or while, leaving Egypt, stories developed, as related by Herodotus, that he was struck down for impiety against the ancient Egyptian deities. After the death of Cambyses II, Darius ascended the throne by overthrowing the legitimate Achaemenid monarch Bardiya, and then quelling rebellions throughout his kingdom. As the winner, Darius I, based his claim on membership in a collateral line of the Achaemenid Empire. Darius' first capital was at Susa, and he started the building program at Persepolis. He rebuilt a canal between the Nile and the Red Sea, a forerunner of the modern Suez Canal. He improved the extensive road system, and it is during his reign that mentions are first made of the Royal Road (shown on map), a great highway stretching all the way from Susa to Sardis with posting stations at regular intervals. Major reforms took place under Darius. Coinage, in the form of the daric (gold coin) and the shekel (silver coin) was standardized (coinage had already been invented over a century before in Lydia c. 660 BC but not standardized), and administrative efficiency increased. The Old Persian language appears in royal inscriptions, written in a specially adapted version of the cuneiform script. Under Cyrus the Great and Darius I, the Persian Empire eventually became the largest empire in human history up until that point, ruling and administrating over most of the then known world, as well as spanning the continents of Europe, Asia, and Africa. The greatest achievement was the empire itself. The Persian Empire represented the world's first superpower that was based on a model of tolerance and respect for other cultures and religions. In the late sixth century BC, Darius launched his European campaign, in which he defeated the Paeonians, conquered Thrace, and subdued all coastal Greek cities, as well as defeating the European Scythians around the Danube river. In 512/511 BC, Macedon became a vassal kingdom of Persia. In 499 BC, Athens lent support to a revolt in Miletus, which resulted in the sacking of Sardis. This led to an Achaemenid campaign against mainland Greece known as the Greco-Persian Wars, which lasted the first half of the 5th century BC, and is known as one of the most important wars in European history. In the First Persian invasion of Greece, the Persian general Mardonius re-subjugated Thrace and made Macedon a full part of Persia. The war eventually turned out in defeat, however. Darius' successor Xerxes I launched the Second Persian invasion of Greece. At a crucial moment in the war, about half of mainland Greece was overrun by the Persians, including all territories to the north of the Isthmus of Corinth, however, this was also turned out in a Greek victory, following the battles of Plataea and Salamis, by which Persia lost its footholds in Europe, and eventually withdrew from it. During the Greco-Persian wars, the Persians gained major territorial advantages. They captured and razed Athens twice, once in 480 BC and again in 479 BC. However, after a string of Greek victories the Persians were forced to withdraw, thus losing control of Macedonia, Thrace and Ionia. Fighting continued for several decades after the successful Greek repelling of the Second Invasion with numerous Greek city-states under the Athens' newly formed Delian League, which eventually ended with the peace of Callias in 449 BC, ending the Greco-Persian Wars. In 404 BC, following the death of Darius II, Egypt rebelled under Amyrtaeus. Later pharaohs successfully resisted Persian attempts to reconquer Egypt until 343 BC, when Egypt was reconquered by Artaxerxes III. Greek conquest and Seleucid Empire (312 BC–248 BC)

From 334 BC to 331 BC, Alexander the Great defeated Darius III in the battles of Granicus, Issus and Gaugamela, swiftly conquering the Persian Empire by 331 BC. Alexander's empire broke up shortly after his death, and Alexander's general, Seleucus I Nicator, tried to take control of Iran, Mesopotamia, and later Syria and Anatolia. His empire was the Seleucid Empire. He was killed in 281 BC by Ptolemy Keraunos. Greek language, philosophy, and art came with the colonists. During the Seleucid era, Greek became the common tongue of diplomacy and literature throughout the empire. Parthian Empire (248 BC–224 AD)

The Parthian Empireruled by the Parthians, a group of northwestern Iranian peoplewas the realm of the Arsacid dynasty. This latter reunited and governed the Iranian plateau after the Parni conquest of Parthia and defeating the Seleucid Empire in the late third century BC. It intermittently controlled Mesopotamia between  and  absorbed Eastern Arabia. Parthia was the eastern arch-enemy of the Roman Empire and it limited Rome's expansion beyond Cappadocia (central Anatolia). The Parthian armies included two types of cavalry: the heavily armed and armored cataphracts and the lightly-armed but highly-mobile mounted archers. For the Romans, who relied on heavy infantry, the Parthians were too hard to defeat, as both types of cavalry were much faster and more mobile than foot soldiers. The Parthian shot used by the Parthian cavalry was most notably feared by the Roman soldiers, which proved pivotal in the crushing Roman defeat at the Battle of Carrhae. On the other hand, the Parthians found it difficult to occupy conquered areas as they were unskilled in siege warfare. Because of these weaknesses, neither the Romans nor the Parthians were able completely to annex each other's territory. The Parthian empire subsisted for five centuries, longer than most Eastern Empires. The end of this empire came at last in 224 AD, when the empire's organization had loosened and the last king was defeated by one of the empire's vassal peoples, the Persians under the Sasanians. However, the Arsacid dynasty continued to exist for centuries onwards in Armenia, the Iberia, and the Caucasian Albania, which were all eponymous branches of the dynasty. Sasanian Empire (224–651 AD)

The first shah of the Sasanian Empire, Ardashir I, started reforming the country economically and militarily. For a period of more than 400 years, Iran was once again one of the leading powers in the world, alongside its neighbouring rival, the Roman and then Byzantine Empires. The empire's territory, at its height, encompassed all of today's Iran, Iraq, Azerbaijan, Armenia, Georgia, Abkhazia, Dagestan, Lebanon, Jordan, Palestine, Israel, parts of Afghanistan, Turkey, Syria, parts of Pakistan, Central Asia, Eastern Arabia, and parts of Egypt. Most of the Sasanian Empire's lifespan was overshadowed by the frequent Byzantine–Sasanian wars, a continuation of the Roman–Parthian Wars and the all-comprising Roman–Persian Wars; the last was the longest-lasting conflict in human history. Started in the first century BC by their predecessors, the Parthians, and Romans, the last Roman–Persian War was fought in the seventh century. The Persians defeated the Romans at the Battle of Edessa in 260 and took emperor Valerian prisoner for the remainder of his life. Eastern Arabia was conquered early on. During Khosrow II's rule in 590–628, Egypt, Jordan, Palestine and Lebanon were also annexed to the Empire. The Sassanians called their empire Erânshahr ("Dominion of the Aryans", i.e., of Iranians). A chapter of Iran's history followed after roughly six hundred years of conflict with the Roman Empire. During this time, the Sassanian and Romano-Byzantine armies clashed for influence in Anatolia, the western Caucasus (mainly Lazica and the Kingdom of Iberia; modern-day Georgia and Abkhazia), Mesopotamia, Armenia and the Levant. Under Justinian I, the war came to an uneasy peace with payment of tribute to the Sassanians. However, the Sasanians used the deposition of the Byzantine emperor Maurice as a casus belli to attack the Empire. After many gains, the Sassanians were defeated at Issus, Constantinople, and finally Nineveh, resulting in peace. With the conclusion of the over 700 years lasting Roman–Persian Wars through the climactic Byzantine–Sasanian War of 602–628, which included the very siege of the Byzantine capital of Constantinople, the war-exhausted Persians lost the Battle of al-Qādisiyyah (632) in Hilla (present-day Iraq) to the invading Muslim forces. The Sasanian era, encompassing the length of Late Antiquity, is considered to be one of the most important and influential historical periods in Iran, and had a major impact on the world. In many ways, the Sassanian period witnessed the highest achievement of Persian civilization and constitutes the last great Iranian Empire before the adoption of Islam. Persia influenced Roman civilization considerably during Sassanian times, their cultural influence extending far beyond the empire's territorial borders, reaching as far as Western Europe, Africa, China and India and also playing a prominent role in the formation of both European and Asiatic medieval art. This influence carried forward to the Muslim world. The dynasty's unique and aristocratic culture transformed the Islamic conquest and destruction of Iran into a Persian Renaissance. Much of what later became known as Islamic culture, architecture, writing, and other contributions to civilization, were taken from the Sassanian Persians into the broader Muslim world. Medieval period

Early Islamic period

Islamic conquest of Persia (633–651)

In 633, when the Sasanian king Yazdegerd III was ruling over Iran, the Muslims under Umar invaded the country right after it had been in a bloody civil war. Several Iranian nobles and families such as king Dinar of the House of Karen, and later Kanarangiyans of Khorasan, mutinied against their Sasanian overlords. Although the House of Mihran had claimed the Sasanian throne under the two prominent generals Bahrām Chōbin and Shahrbaraz, it remained loyal to the Sasanians during their struggle against the Arabs, but the Mihrans were eventually betrayed and defeated by their own kinsmen, the House of Ispahbudhan, under their leader Farrukhzad, who had mutinied against Yazdegerd III. Yazdegerd III, fled from one district to another until a local miller killed him for his purse at Merv in 651. By 674, Muslims had conquered Greater Khorasan (which included modern Iranian Khorasan province and modern Afghanistan and parts of Transoxiana). The Muslim conquest of Persia ended the Sasanian Empire and led to the eventual decline of the Zoroastrian religion in Persia. Over time, the majority of Iranians converted to Islam. Most of the aspects of the previous Persian civilizations were not discarded but were absorbed by the new Islamic polity. As Bernard Lewis has commented:

Umayyad era and Muslim incursions into the Caspian coast

After the fall of the Sasanian Empire in 651, the Arabs of the Umayyad Caliphate adopted many Persian customs, especially the administrative and the court mannerisms. Arab provincial governors were undoubtedly either Persianized Arameans or ethnic Persians; certainly Persian remained the language of official business of the caliphate until the adoption of Arabic toward the end of the seventh century, when in 692 minting began at the capital, Damascus. The new Islamic coins evolved from imitations of Sasanian coins (as well as Byzantine), and the Pahlavi script on the coinage was replaced with Arabic alphabet. During the Umayyad Caliphate, the Arab conquerors imposed Arabic as the primary language of the subject peoples throughout their empire. Al-Hajjaj ibn Yusuf, who was not happy with the prevalence of the Persian language in the divan, ordered the official language of the conquered lands to be replaced by Arabic, sometimes by force. In al-Biruni's From The Remaining Signs of Past Centuries for example it is written:

There are a number of historians who see the rule of the Umayyads as setting up the "dhimmah" to increase taxes from the dhimmis to benefit the Muslim Arab community financially and by discouraging conversion. Governors lodged complaints with the caliph when he enacted laws that made conversion easier, depriving the provinces of revenues. In the 7th century, when many non-Arabs such as Persians entered Islam, they were recognized as mawali ("clients") and treated as second-class citizens by the ruling Arab elite until the end of the Umayyad Caliphate. During this era, Islam was initially associated with the ethnic identity of the Arab and required formal association with an Arab tribe and the adoption of the client status of mawali. The half-hearted policies of the late Umayyads to tolerate non-Arab Muslims and Shias had failed to quell unrest among these minorities. However, all of Iran was still not under Arab control, and the region of Daylam was under the control of the Daylamites, while Tabaristan was under Dabuyid and Paduspanid control, and the Mount Damavand region under Masmughans of Damavand. The Arabs had invaded these regions several times but achieved no decisive result because of the inaccessible terrain of the regions. The most prominent ruler of the Dabuyids, known as Farrukhan the Great (r. 712–728), managed to hold his domains during his long struggle against the Arab general Yazid ibn al-Muhallab, who was defeated by a combined Dailamite-Dabuyid army, and was forced to retreat from Tabaristan. With the death of the Umayyad Caliph Hisham ibn Abd al-Malik in 743, the Islamic world was launched into civil war. Abu Muslim was sent to Khorasan by the Abbasid Caliphate initially as a propagandist and then to revolt on their behalf. He took Merv defeating the Umayyad governor there Nasr ibn Sayyar. He became the de facto Abbasid governor of Khurasan. During the same period, the Dabuyid ruler Khurshid declared independence from the Umayyads but was shortly forced to recognize Abbasid authority. In 750, Abu Muslim became the leader of the Abbasid army and defeated the Umayyads at the Battle of the Zab. Abu Muslim stormed Damascus, the capital of the Umayyad caliphate, later that year. Abbasid period and autonomous Iranian dynasties 

The Abbasid army consisted primarily of Khorasanians and was led by an Iranian general, Abu Muslim Khorasani. It contained both Iranian and Arab elements, and the Abbasids enjoyed both Iranian and Arab support. The Abbasids overthrew the Umayyads in 750. According to Amir Arjomand, the Abbasid Revolution essentially marked the end of the Arab empire and the beginning of a more inclusive, multi-ethnic state in the Middle East. One of the first changes the Abbasids made after taking power from the Umayyads was to move the empire's capital from Damascus, in the Levant, to Iraq. The latter region was influenced by Persian history and culture, and moving the capital was part of the Persian mawali demand for Arab influence in the empire. The city of Baghdad was constructed on the Tigris River, in 762, to serve as the new Abbasid capital. The Abbasids established the position of vizier like Barmakids in their administration, which was the equivalent of a "vice-caliph", or second-in-command. Eventually, this change meant that many caliphs under the Abbasids ended up in a much more ceremonial role than ever before, with the vizier in real power. A new Persian bureaucracy began to replace the old Arab aristocracy, and the entire administration reflected these changes, demonstrating that the new dynasty was different in many ways from the Umayyads. By the 9th century, Abbasid control began to wane as regional leaders sprang up in the far corners of the empire to challenge the central authority of the Abbasid caliphate. The Abbasid caliphs began enlisting mamluks, Turkic-speaking warriors, who had been moving out of Central Asia into Transoxiana as slave warriors as early as the 9th century. Shortly thereafter the real power of the Abbasid caliphs began to wane; eventually, they became religious figureheads while the warrior slaves ruled. The 9th century also saw the revolt by native Zoroastrians, known as the Khurramites, against oppressive Arab rule. The movement was led by a Persian freedom fighter Babak Khorramdin. Babak's Iranianizing rebellion, from its base in Azerbaijan in northwestern Iran, called for a return of the political glories of the Iranian past. The Khorramdin rebellion of Babak spread to the Western and Central parts of Iran and lasted more than twenty years before it was defeated when Babak was betrayed by Afshin, a senior general of the Abbasid Caliphate. As the power of the Abbasid caliphs diminished, a series of dynasties rose in various parts of Iran, some with considerable influence and power. Among the most important of these overlapping dynasties were the Tahirids in Khorasan (821–873); the Saffarids in Sistan (861–1003, their rule lasted as maliks of Sistan until 1537); and the Samanids (819–1005), originally at Bukhara. The Samanids eventually ruled an area from central Iran to Pakistan. By the early 10th century, the Abbasids almost lost control to the growing Persian faction known as the Buyid dynasty (934–1062). Since much of the Abbasid administration had been Persian anyway, the Buyids were quietly able to assume real power in Baghdad. The Buyids were defeated in the mid-11th century by the Seljuq Turks, who continued to exert influence over the Abbasids, while publicly pledging allegiance to them. The balance of power in Baghdad remained as such – with the Abbasids in power in name only – until the Mongol invasion of 1258 sacked the city and definitively ended the Abbasid dynasty. During the Abbasid period an enfranchisement was experienced by the mawali and a shift was made in political conception from that of a primarily Arab empire to one of a Muslim empire and c. 930 a requirement was enacted that required all bureaucrats of the empire be Muslim. Islamic golden age, Shu'ubiyya movement and Persianization process

Islamization was a long process by which Islam was gradually adopted by the majority population of Iran. Richard Bulliet's "conversion curve" indicates that only about 10% of Iran converted to Islam during the relatively Arab-centric Umayyad period. Beginning in the Abbasid period, with its mix of Persian as well as Arab rulers, the Muslim percentage of the population rose. As Persian Muslims consolidated their rule of the country, the Muslim population rose from approximately 40% in the mid-9th century to close to 90% by the end of the 11th century. Seyyed Hossein Nasr suggests that the rapid increase in conversion was aided by the Persian nationality of the rulers. Although Persians adopted the religion of their conquerors, over the centuries they worked to protect and revive their distinctive language and culture, a process known as Persianization. Arabs and Turks participated in this attempt. In the 9th and 10th centuries, non-Arab subjects of the Ummah created a movement called Shu'ubiyyah in response to the privileged status of Arabs. Most of those behind the movement were Persian, but references to Egyptians, Berbers and Aramaeans are attested. Citing as its basis Islamic notions of equality of races and nations, the movement was primarily concerned with preserving Persian culture and protecting Persian identity, though within a Muslim context. The Samanid dynasty led the revival of Persian culture and the first important Persian poet after the arrival of Islam, Rudaki, was born during this era and was praised by Samanid kings. The Samanids also revived many ancient Persian festivals. Their successor, the Ghaznawids, who were of non-Iranian Turkic origin, also became instrumental in the revival of Persian culture. The culmination of the Persianization movement was the Shahnameh, the national epic of Iran, written almost entirely in Persian. This voluminous work, reflects Iran's ancient history, its unique cultural values, its pre-Islamic Zoroastrian religion, and its sense of nationhood. According to Bernard Lewis:

"Iran was indeed Islamized, but it was not Arabized. Persians remained Persians. And after an interval of silence, Iran re-emerged as a separate, different and distinctive element within Islam, eventually adding a new element even to Islam itself. Culturally, politically, and most remarkable of all even religiously, the Iranian contribution to this new Islamic civilization is of immense importance. The work of Iranians can be seen in every field of cultural endeavour, including Arabic poetry, to which poets of Iranian origin composing their poems in Arabic made a very significant contribution. In a sense, Iranian Islam is a second advent of Islam itself, a new Islam sometimes referred to as Islam-i Ajam. It was this Persian Islam, rather than the original Arab Islam, that was brought to new areas and new peoples: to the Turks, first in Central Asia and then in the Middle East in the country which came to be called Turkey, and of course to India. The Ottoman Turks brought a form of Iranian civilization to the walls of Vienna..."

The Islamization of Iran was to yield deep transformations within the cultural, scientific, and political structure of Iran's society: The blossoming of Persian literature, philosophy, medicine and art became major elements of the newly forming Muslim civilization. Inheriting a heritage of thousands of years of civilization, and being at the "crossroads of the major cultural highways", contributed to Persia emerging as what culminated into the "Islamic Golden Age". During this period, hundreds of scholars and scientists vastly contributed to technology, science and medicine, later influencing the rise of European science during the Renaissance. The most important scholars of almost all of the Islamic sects and schools of thought were Persian or lived in Iran, including the most notable and reliable Hadith collectors of Shia and Sunni like Shaikh Saduq, Shaikh Kulainy, Hakim al-Nishaburi, Imam Muslim and Imam Bukhari, the greatest theologians of Shia and Sunni like Shaykh Tusi, Imam Ghazali, Imam Fakhr al-Razi and Al-Zamakhshari, the greatest physicians, astronomers, logicians, mathematicians, metaphysicians, philosophers and scientists like Avicenna and Nasīr al-Dīn al-Tūsī, and the greatest shaykhs of Sufism like Rumi and Abdul-Qadir Gilani. Persianate states and dynasties (977–1219)

In 977, a Turkic governor of the Samanids, Sabuktigin, conquered Ghazna (in present-day Afghanistan) and established a dynasty, the Ghaznavids, that lasted to 1186. The Ghaznavid empire grew by taking all of the Samanid territories south of the Amu Darya in the last decade of the 10th century, and eventually occupied parts of Eastern Iran, Afghanistan, Pakistan and north-west India. The Ghaznavids are generally credited with launching Islam into a mainly Hindu India. The invasion of India was undertaken in 1000 by the Ghaznavid ruler, Mahmud, and continued for several years. They were unable to hold power for long, however, particularly after the death of Mahmud in 1030. By 1040 the Seljuqs had taken over the Ghaznavid lands in Iran. The Seljuqs, who like the Ghaznavids were Persianate in nature and of Turkic origin, slowly conquered Iran over the course of the 11th century. The dynasty had its origins in the Turcoman tribal confederations of Central Asia and marked the beginning of Turkic power in the Middle East. They established a Sunni Muslim rule over parts of Central Asia and the Middle East from the 11th to 14th centuries. They set up an empire known as Great Seljuq Empire that stretched from Anatolia in the west to western Afghanistan in the east and the western borders of (modern-day) China in the north-east; and was the target of the First Crusade. Today they are regarded as the cultural ancestors of the Western Turks, the present-day inhabitants of Turkey and Turkmenistan, and they are remembered as great patrons of Persian culture, art, literature, and language. The founder of the dynasty, Tughril Beg, turned his army against the Ghaznavids in Khorasan. He moved south and then west, conquering but not wasting the cities in his path. In 1055 the caliph in Baghdad gave Tughril Beg robes, gifts, and the title King of the East. Under Tughril Beg's successor, Malik Shah (1072–1092), Iran enjoyed a cultural and scientific renaissance, largely attributed to his brilliant Iranian vizier, Nizam al Mulk. These leaders established the observatory where Omar Khayyám did much of his experimentation for a new calendar, and they built religious schools in all the major towns. They brought Abu Hamid Ghazali, one of the greatest Islamic theologians, and other eminent scholars to the Seljuq capital at Baghdad and encouraged and supported their work. When Malik Shah I died in 1092, the empire split as his brother and four sons quarreled over the apportioning of the empire among themselves. In Anatolia, Malik Shah I was succeeded by Kilij Arslan I who founded the Sultanate of Rûm and in Syria by his brother Tutush I. In Persia he was succeeded by his son Mahmud I whose reign was contested by his other three brothers Barkiyaruq in Iraq, Muhammad I in Baghdad and Ahmad Sanjar in Khorasan. As Seljuq power in Iran weakened, other dynasties began to step up in its place, including a resurgent Abbasid caliphate and the Khwarezmshahs. The Khwarezmid Empire was a Sunni Muslim Persianate dynasty, of East Turkic origin, that ruled in Central Asia. Originally vassals of the Seljuqs, they took advantage of the decline of the Seljuqs to expand into Iran. In 1194 the Khwarezmshah Ala ad-Din Tekish defeated the Seljuq sultan Toghrul III in battle and the Seljuq empire in Iran collapsed. Of the former Seljuq Empire, only the Sultanate of Rum in Anatolia remained. A serious internal threat to the Seljuqs during their reign came from the Nizari Ismailis, a secret sect with headquarters at Alamut Castle between Rasht and Tehran. They controlled the immediate area for more than 150 years and sporadically sent out adherents to strengthen their rule by murdering important officials. Several of the various theories on the etymology of the word assassin derive from these killers. Parts of northwestern Iran were conquered in the early 13th century AD by the Kingdom of Georgia, led by Tamar the Great. Mongol conquest and rule (1219–1370)

Mongol invasion (1219–1221)

The Khwarazmian dynasty only lasted for a few decades, until the arrival of the Mongols. Genghis Khan had unified the Mongols, and under him the Mongol Empire quickly expanded in several directions. In 1218, it bordered Khwarezm. At that time, the Khwarazmian Empire was ruled by Ala ad-Din Muhammad (1200–1220). Muhammad, like Genghis, was intent on expanding his lands and had gained the submission of most of Iran. He declared himself shah and demanded formal recognition from the Abbasid caliph Al-Nasir. When the caliph rejected his claim, Ala ad-Din Muhammad proclaimed one of his nobles caliph and unsuccessfully tried to depose an-Nasir. The Mongol invasion of Iran began in 1219, after two diplomatic missions to Khwarezm sent by Genghis Khan had been massacred. During 1220–21 Bukhara, Samarkand, Herat, Tus and Nishapur were razed, and the whole populations were slaughtered. The Khwarezm-Shah fled, to die on an island off the Caspian coast. During the invasion of Transoxiana in 1219, along with the main Mongol force, Genghis Khan used a Chinese specialist catapult unit in battle, they were used again in 1220 in Transoxania. The Chinese may have used the catapults to hurl gunpowder bombs, since they already had them by this time. While Genghis Khan was conquering Transoxania and Persia, several Chinese who were familiar with gunpowder were serving in Genghis's army. "Whole regiments" entirely made out of Chinese were used by the Mongols to command bomb hurling trebuchets during the invasion of Iran. Historians have suggested that the Mongol invasion had brought Chinese gunpowder weapons to Central Asia. One of these was the huochong, a Chinese mortar. Books written around the area afterward depicted gunpowder weapons which resembled those of China. Destruction under the Mongols 
Before his death in 1227, Genghis had reached western Azerbaijan, pillaging and burning many cities along the way after entering into Iran from its north east. The Mongol invasion was by and large disastrous to the Iranians. Although the Mongol invaders eventually converted to Islam and accepted the culture of Iran, the Mongol destruction in Iran and other regions of the Islamic heartland (particularly the historical Khorasan region, mainly in Central Asia) marked a major change of direction for the region. Much of the six centuries of Islamic scholarship, culture, and infrastructure was destroyed as the invaders leveled cities, burned libraries, and in some cases replaced mosques with Buddhist temples. The Mongols killed many Iranian civilians. Destruction of qanat irrigation systems in the north east of Iran destroyed the pattern of relatively continuous settlements, producing many abandoned towns which were relatively quite good with irrigation and agriculture. Ilkhanate (1256–1335)

After Genghis's death, Iran was ruled by several Mongol commanders. Genghis' grandson, Hulagu Khan, was tasked with the westward expansion of Mongol dominion. However, by the time he ascended to power, the Mongol Empire had already dissolved, dividing into different factions. Arriving with an army, he established himself in the region and founded the Ilkhanate, a breakaway state of the Mongol Empire, which would rule Iran for the next eighty years and become Persian in the process. Hulagu Khan seized Baghdad in 1258 and put the last Abbasid caliph to death. The westward advance of his forces was stopped by the Mamelukes, however, at the Battle of Ain Jalut in Palestine in 1260. Hulagu's campaigns against the Muslims also enraged Berke, khan of the Golden Horde and a convert to Islam. Hulagu and Berke fought against each other, demonstrating the weakening unity of the Mongol empire. The rule of Hulagu's great-grandson, Ghazan (1295–1304) saw the establishment of Islam as the state religion of the Ilkhanate. Ghazan and his famous Iranian vizier, Rashid al-Din, brought Iran a partial and brief economic revival. The Mongols lowered taxes for artisans, encouraged agriculture, rebuilt and extended irrigation works, and improved the safety of the trade routes. As a result, commerce increased dramatically. Items from India, China, and Iran passed easily across the Asian steppes, and these contacts culturally enriched Iran. For example, Iranians developed a new style of painting based on a unique fusion of solid, two-dimensional Mesopotamian painting with the feathery, light brush strokes and other motifs characteristic of China. After Ghazan's nephew Abu Said died in 1335, however, the Ilkhanate lapsed into civil war and was divided between several petty dynasties – most prominently the Jalayirids, Muzaffarids, Sarbadars and Kartids. The mid-14th-century Black Death killed about 30% of the country's population. Sunnism and Shiism in pre-Safavid Iran 

Prior to the rise of the Safavid Empire, Sunni Islam was the dominant religion, accounting for around 90% of the population at the time. According to Mortaza Motahhari the majority of Iranian scholars and masses remained Sunni until the time of the Safavids. The domination of Sunnis did not mean Shia were rootless in Iran. The writers of The Four Books of Shia were Iranian, as well as many other great Shia scholars. The domination of the Sunni creed during the first nine Islamic centuries characterized the religious history of Iran during this period. There were however some exceptions to this general domination which emerged in the form of the Zaydīs of Tabaristan (see Alid dynasties of northern Iran), the Buyids, the Kakuyids, the rule of Sultan Muhammad Khudabandah (r. Shawwal 703-Shawwal 716/1304–1316) and the Sarbedaran. Apart from this domination there existed, firstly, throughout these nine centuries, Shia inclinations among many Sunnis of this land and, secondly, original Imami Shiism as well as Zaydī Shiism had prevalence in some parts of Iran. During this period, Shia in Iran were nourished from Kufah, Baghdad and later from Najaf and Hillah. Shiism was the dominant sect in Tabaristan, Qom, Kashan, Avaj and Sabzevar. In many other areas merged population of Shia and Sunni lived together. During the 10th and 11th centuries, Fatimids sent Ismailis Da'i (missioners) to Iran as well as other Muslim lands. When Ismailis divided into two sects, Nizaris established their base in Iran. Hassan-i Sabbah conquered fortresses and captured Alamut in 1090 AD. Nizaris used this fortress until a Mongol raid in 1256. After the Mongol raid and fall of the Abbasids, Sunni hierarchies faltered. Not only did they lose the caliphate but also the status of official madhhab. Their loss was the gain of Shia, whose centre wasn't in Iran at that time. Several local Shia dynasties like Sarbadars were established during this time. The main change occurred in the beginning of the 16th century, when Ismail I founded the Safavid dynasty and initiated a religious policy to recognize Shi'a Islam as the official religion of the Safavid Empire, and the fact that modern Iran remains an officially Shi'ite state is a direct result of Ismail's actions. Timurid Empire (1370–1507) 

Iran remained divided until the arrival of Timur, a Turco-Mongol belonging to the Timurid dynasty. Like its predecessors, the Timurid Empire was also part of the Persianate world. After establishing a power base in Transoxiana, Timur invaded Iran in 1381 and eventually conquered most of it. Timur's campaigns were known for their brutality; many people were slaughtered and several cities were destroyed. His regime was characterized by tyranny and bloodshed, but also by its inclusion of Iranians in administrative roles and its promotion of architecture and poetry. His successors, the Timurids, maintained a hold on most of Iran until 1452, when they lost the bulk of it to Black Sheep Turkmen. The Black Sheep Turkmen were conquered by the White Sheep Turkmen under Uzun Hasan in 1468; Uzun Hasan and his successors were the masters of Iran until the rise of the Safavids. Sufi poet Hafez's popularity became firmly established in the Timurid era that saw the compilation and widespread copying of his divan. Sufis were often persecuted by orthodox Muslims who considered their teachings blasphemous. Sufism developed a symbolic language rich with metaphors to obscure poetic references to provocative philosophical teachings. Hafez concealed his own Sufi faith, even as he employed the secret language of Sufism (developed over hundreds of years) in his own work, and he is sometimes credited with having "brought it to perfection". His work was imitated by Jami, whose own popularity grew to spread across the full breadth of the Persianate world. Kara Koyunlu

The Kara Koyunlu were a Turkmen tribal federation that ruled over northwestern Iran and surrounding areas from 1374 to 1468 CE. The Kara Koyunlu expanded their conquest to Baghdad, however, internal fighting, defeats by the Timurids, rebellions by the Armenians in response to their persecution, and failed struggles with the Ag Qoyunlu led to their eventual demise. Ak Koyunlu 

Aq Qoyunlu were Turkmen under the leadership of the Bayandur tribe, tribal federation of Sunni Muslims who ruled over most of Iran and large parts of surrounding areas from 1378 to 1501 CE. Aq Qoyunlu emerged when Timur granted them all of Diyar Bakr in present-day Turkey. Afterward, they struggled with their rival Oghuz Turks, the Qara Qoyunlu. While the Aq Qoyunlu were successful in defeating Kara Koyunlu, their struggle with the emerging Safavid dynasty led to their downfall. Early modern period
Persia underwent a revival under the Safavid dynasty (1502–1736), the most prominent figure of which was Shah Abbas I. Some historians credit the Safavid dynasty for founding the modern nation-state of Iran. Iran's contemporary Shia character, and significant segments of Iran's current borders take their origin from this era (e.g. Treaty of Zuhab). Safavid Empire (1501–1736)

The Safavid dynasty was one of the most significant ruling dynasties of Persia (modern Iran), and "is often considered the beginning of modern Persian history". They ruled one of the greatest Persian empires after the Muslim conquest of Persia and established the Twelver school of Shi'a Islam as the official religion of their empire, marking one of the most important turning points in Muslim history. The Safavids ruled from 1501 to 1722 (experiencing a brief restoration from 1729 to 1736) and at their height, they controlled all of modern Iran, Azerbaijan and Armenia, most of Georgia, the North Caucasus, Iraq, Kuwait and Afghanistan, as well as parts of Turkey, Syria, Pakistan, Turkmenistan and Uzbekistan. Safavid Iran was one of the Islamic "gunpowder empires", along with its neighbours, its archrival and principal enemy the Ottoman Empire, as well as the Mughal Empire. The Safavid ruling dynasty was founded by Ismāil, who styled himself Shāh Ismāil I. Practically worshipped by his Qizilbāsh followers, Ismāil invaded Shirvan to avenge the death of his father, Shaykh Haydar, who had been killed during his siege of Derbent, in Dagestan. Afterwards he went on a campaign of conquest, and following the capture of Tabriz in July 1501, he enthroned himself as the Shāh of Iran, minted coins in this name, and proclaimed Shi'ism the official religion of his domain. Although initially the masters of Azerbaijan and southern Dagestan only, the Safavids had, in fact, won the struggle for power in Persia which had been going on for nearly a century between various dynasties and political forces following the fragmentation of the Kara Koyunlu and the Aq Qoyunlu. A year after his victory in Tabriz, Ismāil proclaimed most of Persia as his domain, and quickly conquered and unified Iran under his rule. Soon afterwards, the new Safavid Empire rapidly conquered regions, nations, and peoples in all directions, including Armenia, Azerbaijan, parts of Georgia, Mesopotamia (Iraq), Kuwait, Syria, Dagestan, large parts of what is now Afghanistan, parts of Turkmenistan, and large chunks of Anatolia, laying the foundation of its multi-ethnic character which would heavily influence the empire itself (most notably the Caucasus and its peoples). Tahmasp I, the son and successor of Ismail I, carried out multiple invasions in the Caucasus which had been incorporated in the Safavid empire since Shah Ismail I and for many centuries afterwards, and started with the trend of deporting and moving hundreds of thousands of Circassians, Georgians, and Armenians to Iran's heartlands. Initially only solely put in the royal harems, royal guards, and minor other sections of the Empire, Tahmasp believed he could eventually reduce the power of the Qizilbash, by creating and fully integrating a new layer in Iranian society. As Encyclopædia Iranica states, for Tahmasp, the problem circled around the military tribal elite of the empire, the Qizilbash, who believed that physical proximity to and control of a member of the immediate Safavid family guaranteed spiritual advantages, political fortune, and material advancement. With this new Caucasian layer in Iranian society, the undisputed might of the Qizilbash (who functioned much like the ghazis of the neighbouring Ottoman Empire) would be questioned and fully diminished as society would become fully meritocratic. Shah Abbas I and his successors would significantly expand this policy and plan initiated by Tahmasp, deporting during his reign alone around some 200,000 Georgians, 300,000 Armenians and 100,000–150,000 Circassians to Iran, completing the foundation of a new layer in Iranian society. With this, and the complete systematic disorganisation of the Qizilbash by his personal orders, he eventually fully succeeded in replacing the power of the Qizilbash, with that of the Caucasian ghulams. These new Caucasian elements (the so-called ghilman / غِلْمَان / "servants"), almost always after conversion to Shi'ism depending on given function would be, unlike the Qizilbash, fully loyal only to the Shah. The other masses of Caucasians were deployed in all other possible functions and positions available in the empire, as well as in the harem, regular military, craftsmen, farmers, etc. This system of mass usage of Caucasian subjects remained to exist until the fall of the Qajar dynasty. The greatest of the Safavid monarchs, Shah Abbas I the Great (1587–1629) came to power in 1587 aged 16. Abbas I first fought the Uzbeks, recapturing Herat and Mashhad in 1598, which had been lost by his predecessor Mohammad Khodabanda by the Ottoman–Safavid War (1578–1590). Then he turned against the Ottomans, the archrivals of the Safavids, recapturing Baghdad, eastern Iraq and the Caucasian provinces and beyond by 1618. Between 1616 and 1618, following the disobedience of his most loyal Georgian subjects Teimuraz I and Luarsab II, Abbas carried out a punitive campaign in his territories of Georgia, devastating Kakheti and Tbilisi and carrying away 130,000 – 200,000 Georgian captives towards mainland Iran. His new army, which had dramatically been improved with the advent of Robert Shirley and his brothers following the first diplomatic mission to Europe, pitted the first crushing victory over the Safavids' archrivals, the Ottomans in the above-mentioned 1603–1618 war and would surpass the Ottomans in military strength. He also used his new force to dislodge the Portuguese from Bahrain (1602) and Hormuz (1622) with aid of the English navy, in the Persian Gulf. He expanded commercial links with the Dutch East India Company and established firm links with the European royal houses, which had been initiated by Ismail I earlier on by the Habsburg–Persian alliance. Thus Abbas I was able to break the dependence on the Qizilbash for military might and therefore was able to centralize control. The Safavid dynasty had already established itself during Shah Ismail I, but under Abbas I it really became a major power in the world along with its archrival the Ottoman Empire, against whom it became able to compete with on equal foot. It also started the promotion of tourism in Iran. Under their rule Persian Architecture flourished again and saw many new monuments in various Iranian cities, of which Isfahan is the most notable example. Except for Shah Abbas the Great, Shah Ismail I, Shah Tahmasp I, and Shah Abbas II, many of the Safavid rulers were ineffectual, often being more interested in their women, alcohol and other leisure activities. The end of Abbas II's reign in 1666, marked the beginning of the end of the Safavid dynasty. Despite falling revenues and military threats, many of the later shahs had lavish lifestyles. Shah Soltan Hosain (1694–1722) in particular was known for his love of wine and disinterest in governance. The declining country was repeatedly raided on its frontiers. Finally, Ghilzai Pashtun chieftain named Mir Wais Khan began a rebellion in Kandahar and defeated the Safavid army under the Iranian Georgian governor over the region, Gurgin Khan. In 1722, Peter the Great of neighbouring Imperial Russia launched the Russo-Persian War (1722–1723), capturing many of Iran's Caucasian territories, including Derbent, Shaki, Baku, but also Gilan, Mazandaran and Astrabad. In the midst of chaos, in the same year of 1722, an Afghan army led by Mir Wais' son Mahmud marched across eastern Iran, besieged and took Isfahan. Mahmud proclaimed himself 'Shah' of Persia. Meanwhile, Persia's imperial rivals, the Ottomans and the Russians, took advantage of the chaos in the country to seize more territory for themselves. By these events, the Safavid dynasty had effectively ended. In 1724, conform the Treaty of Constantinople, the Ottomans and the Russians agreed to divide the newly conquered territories of Iran amongst themselves. Nader Shah and his successors

Iran's territorial integrity was restored by a native Iranian Turkic Afshar warlord from Khorasan, Nader Shah. He defeated and banished the Afghans, defeated the Ottomans, reinstalled the Safavids on the throne, and negotiated Russian withdrawal from Iran's Caucasian territories, with the Treaty of Resht and Treaty of Ganja. By 1736, Nader had become so powerful he was able to depose the Safavids and have himself crowned shah. Nader was one of the last great conquerors of Asia and briefly presided over what was probably the most powerful empire in the world. To financially support his wars against Persia's arch-rival, the Ottoman Empire, he fixed his sights on the weak but rich Mughal Empire to the east. In 1739, accompanied by his loyal Caucasian subjects including Erekle II, he invaded Mughal India, defeated a numerically superior Mughal army in less than three hours, and completely sacked and looted Delhi, bringing back immense wealth to Persia. On his way back, he also conquered all the Uzbek khanates – except for Kokand – and made the Uzbeks his vassals. He also firmly re-established Persian rule over the entire Caucasus, Bahrain, as well as large parts of Anatolia and Mesopotamia. Undefeated for years, his defeat in Dagestan, following guerrilla rebellions by the Lezgins and the assassination attempt on him near Mazandaran is often considered the turning point in Nader's impressive career. To his frustration, the Dagestanis resorted to guerrilla warfare, and Nader with his conventional army could make little headway against them. At the Battle of Andalal and the Battle of Avaria, Nader's army was crushingly defeated and he lost half of his entire force, as well forcing him to flee for the mountains. Though Nader managed to take most of Dagestan during his campaign, the effective guerrilla warfare as deployed by the Lezgins, but also the Avars and Laks made the Iranian re-conquest of the particular North Caucasian region this time a short lived one; several years later, Nader was forced to withdraw. Around the same time, the assassination attempt was made on him near Mazandaran which accelerated the course of history; he slowly grew ill and megalomaniac, blinding his sons whom he suspected of the assassination attempts, and showing increasing cruelty against his subjects and officers. In his later years this eventually provoked multiple revolts and, ultimately, Nader's assassination in 1747. Nader's death was followed by a period of anarchy in Iran as rival army commanders fought for power. Nader's own family, the Afsharids, were soon reduced to holding on to a small domain in Khorasan. Many of the Caucasian territories broke away in various Caucasian khanates. Ottomans regained lost territories in Anatolia and Mesopotamia. Oman and the Uzbek khanates of Bukhara and Khiva regained independence. Ahmad Shah Durrani, one of Nader's officers, founded an independent state which eventually became modern Afghanistan. Erekle II and Teimuraz II, who, in 1744, had been made the kings of Kakheti and Kartli respectively by Nader himself for their loyal service, capitalized on the eruption of instability, and declared de facto independence. Erekle II assumed control over Kartli after Teimuraz II's death, thus unifying the two as the Kingdom of Kartli-Kakheti, becoming the first Georgian ruler in three centuries to preside over a politically unified eastern Georgia, and due to the frantic turn of events in mainland Iran he would be able to remain de facto autonomous through the Zand period. From his capital Shiraz, Karim Khan of the Zand dynasty ruled "an island of relative calm and peace in an otherwise bloody and destructive period," however the extent of Zand power was confined to contemporary Iran and parts of the Caucasus. Karim Khan's death in 1779 led to yet another civil war in which the Qajar dynasty eventually triumphed and became kings of Iran. During the civil war, Iran permanently lost Basra in 1779 to the Ottomans, which had been captured during the Ottoman–Persian War (1775–76), and Bahrain to Al Khalifa family after Bani Utbah invasion in 1783. Late modern period

Qajar dynasty (1796–1925)

Agha Mohammad Khan emerged victorious out of the civil war that commenced with the death of the last Zand king. His reign is noted for the reemergence of a centrally led and united Iran. After the death of Nader Shah and the last of the Zands, most of Iran's Caucasian territories had broken away into various Caucasian khanates. Agha Mohammad Khan, like the Safavid kings and Nader Shah before him, viewed the region as no different from the territories in mainland Iran. Therefore, his first objective after having secured mainland Iran, was to reincorpate the Caucasus region into Iran. Georgia was seen as one of the most integral territories. For Agha Mohammad Khan, the resubjugation and reintegration of Georgia into the Iranian Empire was part of the same process that had brought Shiraz, Isfahan, and Tabriz under his rule. As the Cambridge History of Iran states, its permanent secession was inconceivable and had to be resisted in the same way as one would resist an attempt at the separation of Fars or Gilan. It was therefore natural for Agha Mohammad Khan to perform whatever necessary means in the Caucasus in order to subdue and reincorporate the recently lost regions following Nader Shah's death and the demise of the Zands, including putting down what in Iranian eyes was seen as treason on the part of the wali (viceroy) of Georgia, namely the Georgian king Erekle II (Heraclius II) who was appointed viceroy of Georgia by Nader Shah himself. Agha Mohammad Khan subsequently demanded that Heraclius II renounce its 1783 treaty with Russia, and to submit again to Persian suzerainty, in return for peace and the security of his kingdom. The Ottomans, Iran's neighboring rival, recognized the latter's rights over Kartli and Kakheti for the first time in four centuries. Heraclius appealed then to his theoretical protector, Empress Catherine II of Russia, pleading for at least 3,000 Russian troops, but he was ignored, leaving Georgia to fend off the Persian threat alone. Nevertheless, Heraclius II still rejected the Khan's ultimatum. As a response, Agha Mohammad Khan invaded the Caucasus region after crossing the Aras river, and, while on his way to Georgia, he re-subjugated Iran's territories of the Erivan Khanate, Shirvan, Nakhchivan Khanate, Ganja khanate, Derbent Khanate, Baku khanate, Talysh Khanate, Shaki Khanate, Karabakh Khanate, which comprise modern-day Armenia, Azerbaijan, Dagestan, and Igdir. Having reached Georgia with his large army, he prevailed in the Battle of Krtsanisi, which resulted in the capture and sack of Tbilisi, as well as the effective resubjugation of Georgia. Upon his return from his successful campaign in Tbilisi and in effective control over Georgia, together with some 15,000 Georgian captives that were moved back to mainland Iran, Agha Mohammad was formally crowned Shah in 1796 in the Mughan plain, just as his predecessor Nader Shah was about sixty years earlier. Agha Mohammad Shah was later assassinated while preparing a second expedition against Georgia in 1797 in Shusha (now part of the Republic of Azerbaijan) and the seasoned king Heraclius died early in 1798. The reassertion of Iranian hegemony over Georgia did not last long; in 1799 the Russians marched into Tbilisi. The Russians were already actively occupied with an expansionist policy towards its neighboring empires to its south, namely the Ottoman Empire and the successive Iranian kingdoms since the late 17th/early 18th century. The next two years following Russia's entrance into Tbilisi were a time of confusion, and the weakened and devastated Georgian kingdom, with its capital half in ruins, was easily absorbed by Russia in 1801. As Iran could not permit or allow the cession of Transcaucasia and Dagestan, which had been an integral part of Iran for centuries, this would lead directly to the wars of several years later, namely the Russo-Persian Wars of 1804-1813 and 1826–1828. The outcome of these two wars (in the Treaty of Gulistan and the Treaty of Turkmenchay, respectively) proved for the irrevocable forced cession and loss of what is now eastern Georgia, Dagestan, Armenia, and Azerbaijan to Imperial Russia. The area to the north of the river Aras, among which the territory of the contemporary republic of Azerbaijan, eastern Georgia, Dagestan, and Armenia were Iranian territory until they were occupied by Russia in the course of the 19th century. Migration of Caucasian Muslims

Following the official loss of vast territories in the Caucasus, major demographic shifts were bound to take place. Following the 1804–1814 war, but also per the 1826–1828 war which ceded the last territories, large migrations, so-called Caucasian Muhajirs, set off to migrate to mainland Iran. Some of these groups included the Ayrums, Qarapapaqs, Circassians, Shia Lezgins, and other Transcaucasian Muslims. After the Battle of Ganja of 1804 during the Russo-Persian War (1804–1813), many thousands of Ayrums and Qarapapaqs were settled in Tabriz. During the remaining part of the 1804–1813 war, as well as through the 1826–1828 war, a large number of the Ayrums and Qarapapaqs that were still remaining in newly conquered Russian territories were settled in and migrated to Solduz (in modern-day Iran's West Azerbaijan province). As the Cambridge History of Iran states; "The steady encroachment of Russian troops along the frontier in the Caucasus, General Yermolov's brutal punitive expeditions and misgovernment, drove large numbers of Muslims, and even some Georgian Christians, into exile in Iran." From 1864 until the early 20th century, another mass expulsion took place of Caucasian Muslims as a result of the Russian victory in the Caucasian War. Others simply voluntarily refused to live under Christian Russian rule, and thus departed for Turkey or Iran. These migrations once again, towards Iran, included masses of Caucasian Azerbaijanis, other Transcaucasian Muslims, as well as many North Caucasian Muslims, such as Circassians, Shia Lezgins and Laks. Many of these migrants would prove to play a pivotal role in further Iranian history, as they formed most of the ranks of the Persian Cossack Brigade, which was established in the late 19th century. The initial ranks of the brigade would be entirely composed of Circassians and other Caucasian Muhajirs. This brigade would prove decisive in the following decades in Qajar history. Furthermore, the 1828 Treaty of Turkmenchay included the official rights for the Russian Empire to encourage settling of Armenians from Iran in the newly conquered Russian territories. Until the mid-fourteenth century, Armenians had constituted a majority in Eastern Armenia. At the close of the fourteenth century, after Timur's campaigns, the Timurid Renaissance flourished, and Islam had become the dominant faith, and Armenians became a minority in Eastern Armenia. After centuries of constant warfare on the Armenian Plateau, many Armenians chose to emigrate and settle elsewhere. Following Shah Abbas I's massive relocation of Armenians and Muslims in 1604–05, their numbers dwindled even further. At the time of the Russian invasion of Iran, some 80% of the population of Iranian Armenia were Muslims (Persians, Turkics, and Kurds) whereas Christian Armenians constituted a minority of about 20%. As a result of the Treaty of Gulistan (1813) and the Treaty of Turkmenchay (1828), Iran was forced to cede Iranian Armenia (which also constituted the present-day Armenia), to the Russians. After the Russian administration took hold of Iranian Armenia, the ethnic make-up shifted, and thus for the first time in more than four centuries, ethnic Armenians started to form a majority once again in one part of historic Armenia. The new Russian administration encouraged the settling of ethnic Armenians from Iran proper and Ottoman Turkey. As a result, by 1832, the number of ethnic Armenians had matched that of the Muslims. It would be only after the Crimean War and the Russo-Turkish War of 1877–1878, which brought another influx of Turkish Armenians, that ethnic Armenians once again established a solid majority in Eastern Armenia. Nevertheless, the city of Erivan retained a Muslim majority up to the twentieth century. According to the traveller H. F. B. Lynch, the city of Erivan was about 50% Armenian and 50% Muslim (Tatars i.e. Azeris and Persians) in the early 1890s. Fath Ali Shah's reign saw increased diplomatic contacts with the West and the beginning of intense European diplomatic rivalries over Iran. His grandson Mohammad Shah, who succeeded him in 1834, fell under the Russian influence and made two unsuccessful attempts to capture Herat. When Mohammad Shah died in 1848 the succession passed to his son Naser al-Din Shah Qajar, who proved to be the ablest and most successful of the Qajar sovereigns. He founded the first modern hospital in Iran. Constitutional Revolution and deposition

The Great Persian Famine of 1870–1871 is believed to have caused the death of two million people. A new era in the history of Persia dawned with the Persian Constitutional Revolution against the Shah in the late 19th and early 20th centuries. The Shah managed to remain in power, granting a limited constitution in 1906 (making the country a constitutional monarchy). The first Majlis (parliament) was convened on October 7, 1906. The discovery of petroleum in 1908 by the British in Khuzestan spawned intense renewed interest in Persia by the British Empire (see William Knox D'Arcy and Anglo-Iranian Oil Company, now BP). Control of Persia remained contested between the United Kingdom and Russia, in what became known as The Great Game, and codified in the Anglo-Russian Convention of 1907, which divided Persia into spheres of influence, regardless of her national sovereignty. During World War I, the country was occupied by British, Ottoman and Russian forces but was essentially neutral (see Persian Campaign). In 1919, after the Russian Revolution and their withdrawal, Britain attempted to establish a protectorate in Persia, which was unsuccessful. Finally, the Constitutionalist movement of Gilan and the central power vacuum caused by the instability of the Qajar government resulted in the rise of Reza Khan, who was later to become Reza Shah Pahlavi, and the subsequent establishment of the Pahlavi dynasty in 1925. In 1921, a military coup established Reza Khan, an officer of the Persian Cossack Brigade, as the dominant figure for the next 20 years. Seyyed Zia'eddin Tabatabai was also a leader and important figure in the perpetration of the coup. The coup was not actually directed at the Qajar monarchy; according to Encyclopædia Iranica, it was targeted at officials who were in power and actually had a role in controlling the government — the cabinet and others who had a role in governing Persia. In 1925, after being prime minister for two years, Reza Khan became the first shah of the Pahlavi dynasty. Pahlavi era (1925–1979)

Reza Shah (1925–1941) 

Reza Shah ruled for almost 16 years until September 16, 1941, when he was forced to abdicate by the Anglo-Soviet invasion of Iran. He established an authoritarian government that valued nationalism, militarism, secularism and anti-communism combined with strict censorship and state propaganda. Reza Shah introduced many socio-economic reforms, reorganizing the army, government administration, and finances. To his supporters, his reign brought "law and order, discipline, central authority, and modern amenities – schools, trains, buses, radios, cinemas, and telephones". However, his attempts of modernisation have been criticised for being "too fast" and "superficial", and his reign a time of "oppression, corruption, taxation, lack of authenticity" with "security typical of police states." Many of the new laws and regulations created resentment among devout Muslims and the clergy. For example, mosques were required to use chairs; most men were required to wear western clothing, including a hat with a brim; women were encouraged to discard the hijab; men and women were allowed to congregate freely, violating Islamic mixing of the sexes. Tensions boiled over in 1935, when bazaaris and villagers rose up in rebellion at the Imam Reza shrine in Mashhad, chanting slogans such as 'The Shah is a new Yezid.' Dozens were killed and hundreds were injured when troops finally quelled the unrest. World War II

While German armies were highly successful against the Soviet Union, the Iranian government expected Germany to win the war and establish a powerful force on its borders. It rejected British and Soviet demands to expel German residents from Iran. In response, the two Allies invaded in August 1941 and easily overwhelmed the weak Iranian army in Operation Countenance. Iran became the major conduit of Allied Lend-Lease aid to the Soviet Union. The purpose was to secure Iranian oil fields and ensure Allied supply lines (see Persian Corridor). Iran remained officially neutral. Its monarch Rezā Shāh was deposed during the subsequent occupation and replaced with his young son Mohammad Reza Pahlavi. At the Tehran Conference of 1943, the Allies issued the Tehran Declaration which guaranteed the post-war independence and boundaries of Iran. However, when the war actually ended, Soviet troops stationed in northwestern Iran not only refused to withdraw but backed revolts that established short-lived, pro-Soviet separatist national states in the northern regions of Azerbaijan and Iranian Kurdistan, the Azerbaijan People's Government and the Republic of Kurdistan respectively, in late 1945. Soviet troops did not withdraw from Iran proper until May 1946 after receiving a promise of oil concessions. The Soviet republics in the north were soon overthrown and the oil concessions were revoked. Mohammad-Reza Shah (1941–1979)

Initially there were hopes that post-occupation Iran could become a constitutional monarchy. The new, young Shah Mohammad Reza Shah Pahlavi initially took a very hands-off role in government, and allowed parliament to hold a lot of power. Some elections were held in the first shaky years, although they remained mired in corruption. Parliament became chronically unstable, and from the 1947 to 1951 period Iran saw the rise and fall of six different prime ministers. Pahlavi increased his political power by convening the Iran Constituent Assembly, 1949, which finally formed the Senate of Iran—a legislative upper house allowed for in the 1906 constitution but never brought into being. The new senators were largely supportive of Pahlavi, as he had intended. In 1951 Prime Minister Mohammed Mosaddeq received the vote required from the parliament to nationalize the British-owned oil industry, in a situation known as the Abadan Crisis. Despite British pressure, including an economic blockade, the nationalization continued. Mosaddeq was briefly removed from power in 1952 but was quickly re-appointed by the Shah, due to a popular uprising in support of the premier, and he, in turn, forced the Shah into a brief exile in August 1953 after a failed military coup by Imperial Guard Colonel Nematollah Nassiri. 1953: U.S. aided coup removes Mosaddeq

Shortly thereafter on August 19 a successful coup was headed by retired army general Fazlollah Zahedi, aided by the United States (CIA) with the active support of the British (MI6) (known as Operation Ajax and Operation Boot to the respective agencies). The coup—with a black propaganda campaign designed to turn the population against Mosaddeq  — forced Mosaddeq from office. Mosaddeq was arrested and tried for treason. Found guilty, his sentence was reduced to house arrest on his family estate while his foreign minister, Hossein Fatemi, was executed. Zahedi succeeded him as prime minister, and suppressed opposition to the Shah, specifically the National Front and Communist Tudeh Party. Iran was ruled as an autocracy under the Shah with American support from that time until the revolution. The Iranian government entered into agreement with an international consortium of foreign companies which ran the Iranian oil facilities for the next 25 years, splitting profits fifty-fifty with Iran but not allowing Iran to audit their accounts or have members on their board of directors. In 1957 martial law was ended after 16 years and Iran became closer to the West, joining the Baghdad Pact and receiving military and economic aid from the US. In 1961, Iran initiated a series of economic, social, agrarian and administrative reforms to modernize the country that became known as the Shah's White Revolution. The core of this program was land reform. Modernization and economic growth proceeded at an unprecedented rate, fueled by Iran's vast petroleum reserves, the third-largest in the world. However, the reforms, including the White Revolution, did not greatly improve economic conditions and the liberal pro-Western policies alienated certain Islamic religious and political groups. In early June 1963 several days of massive rioting occurred in support of Ayatollah Ruhollah Khomeini following the cleric's arrest for a speech attacking the Shah. Two years later, premier Hassan Ali Mansur was assassinated and the internal security service, SAVAK, became more violently active. In the 1970s, leftist guerilla groups such as Mujaheddin-e-Khalq (MEK), emerged and attacked regime and foreign targets. Nearly a hundred Iran political prisoners were killed by the SAVAK during the decade before the revolution and many more were arrested and tortured. The Islamic clergy, headed by the Ayatollah Ruhollah Khomeini (who had been exiled in 1964), were becoming increasingly vociferous. Iran greatly increased its defense budget and by the early 1970s was the region's strongest military power. Bilateral relations with its neighbor Iraq were not good, mainly due to a dispute over the Shatt al-Arab waterway. In November 1971, Iranian forces seized control of three islands at the mouth of the Persian Gulf; in response, Iraq expelled thousands of Iranian nationals. Following a number of clashes in April 1969, Iran abrogated the 1937 accord and demanded a renegotiation. In mid-1973, the Shah returned the oil industry to national control. Following the Arab-Israeli War of October 1973, Iran did not join the Arab oil embargo against the West and Israel. Instead, it used the situation to raise oil prices, using the money gained for modernization and to increase defense spending. A border dispute between Iraq and Iran was resolved with the signing of the Algiers Accord on March 6, 1975. Contemporary period

Revolution and the Islamic Republic (1979 to present) 

The Iranian Revolution, also known as the Islamic Revolution, was the revolution that transformed Iran from an absolute monarchy under Shah Mohammad Reza Pahlavi to an Islamic republic under Ayatollah Ruhollah Khomeini, one of the leaders of the revolution and founder of the Islamic Republic. Its time span can be said to have begun in January 1978 with the first major demonstrations, and concluded with the approval of the new theocratic Constitution—whereby Ayatollah Khomeini became Supreme Leader of the country—in December 1979. In between, Mohammad Reza Pahlavi left the country for exile in January 1979 after strikes and demonstrations paralyzed the country, and on February 1, 1979 Ayatollah Khomeini returned to Tehran. The final collapse of the Pahlavi dynasty occurred shortly after on February 11 when Iran's military declared itself "neutral" after guerrillas and rebel troops overwhelmed troops loyal to the Shah in armed street fighting. Iran officially became an Islamic Republic on April 1, 1979, when Iranians overwhelmingly approved a national referendum to make it so. Ideology of the 1979 Iranian Revolution 

The ideology of the revolutionary government was populist, nationalist and most of all Shi'a Islamic. Its unique constitution is based on the concept of velayat-e faqih the idea advanced by Khomeini that Muslims – in fact everyone – requires "guardianship", in the form of rule or supervision by the leading Islamic jurist or jurists. Khomeini served as this ruling jurist, or supreme leader, until his death in 1989. Iran's rapidly modernising, capitalist economy was replaced by populist and Islamic economic and cultural policies. Much industry was nationalized, laws and schools Islamicized, and Western influences banned. The Islamic revolution also created great impact around the world. In the non-Muslim world it has changed the image of Islam, generating much interest in the politics and spirituality of Islam, along with "fear and distrust towards Islam" and particularly the Islamic Republic and its founder. Khomeini (1979–1989) 
Khomeini served as leader of the revolution or as Supreme Leader of Iran from 1979 to his death on June 3, 1989. This era was dominated by the consolidation of the revolution into a theocratic republic under Khomeini, and by the costly and bloody war with Iraq. The consolidation lasted until 1982–3, as Iran coped with the damage to its economy, military, and apparatus of government, and protests and uprisings by secularists, leftists, and more traditional Muslims—formerly ally revolutionaries but now rivals—were effectively suppressed. Many political opponents were executed by the new regimes. Following the events of the revolution, Marxist guerrillas and federalist parties revolted in regions comprising Khuzistan, Kurdistan and Gonbad-e Qabus, resulting in severe fighting between rebels and revolutionary forces. These revolts began in April 1979 and lasted between several months to over a year, depending on the region. The Kurdish uprising, led by the KDPI, was the most violent, lasting until 1983 and resulting in 10,000 casualties. In the summer of 1979 a new constitution giving Khomeini a powerful post as guardian jurist Supreme Leader and a clerical Council of Guardians power over legislation and elections, was drawn up by an Assembly of Experts for Constitution. The new constitution was approved by referendum in December 1979. Iran hostage crisis (1979–1981) 

An early event in the history of the Islamic republic that had a long-term impact was the Iran hostage crisis. Following the admitting of the former Shah of Iran into the United States for cancer treatment, on November 4, 1979, Iranian students seized US embassy personnel, labeling the embassy a "den of spies." Fifty-two hostages were held for 444 days until January 1981. An American military attempt to rescue the hostages failed. The takeover was enormously popular in Iran, where thousands gathered in support of the hostage takers, and it is thought to have strengthened the prestige of the Ayatollah Khomeini and consolidated the hold of anti-Americanism. It was at this time that Khomeini began referring to America as the "Great Satan." In America, where it was considered a violation of the long-standing principle of international law that diplomats may be expelled but not held captive, it created a powerful anti-Iranian backlash. Relations between the two countries have remained deeply antagonistic and American international sanctions have hurt Iran's economy. Iran–Iraq War (1980–1988) 

During this political and social crisis, Iraqi leader Saddam Hussein attempted to take advantage of the disorder of the Revolution, the weakness of the Iranian military and the revolution's antagonism with Western governments. The once-strong Iranian military had been disbanded during the revolution, and with the Shah ousted, Hussein had ambitions to position himself as the new strong man of the Middle East. He sought to expand Iraq's access to the Persian Gulf by acquiring territories that Iraq had claimed earlier from Iran during the Shah's rule. Of chief importance to Iraq was Khuzestan which not only boasted a substantial Arab population, but rich oil fields as well. On the unilateral behalf of the United Arab Emirates, the islands of Abu Musa and the Greater and Lesser Tunbs became objectives as well. With these ambitions in mind, Hussein planned a full-scale assault on Iran, boasting that his forces could reach the capital within three days. On September 22, 1980, the Iraqi army invaded Iran at Khuzestan, precipitating the Iran–Iraq War. The attack took revolutionary Iran completely by surprise. Although Saddam Hussein's forces made several early advances, Iranian forces had pushed the Iraqi army back into Iraq by 1982. Khomeini sought to export his Islamic revolution westward into Iraq, especially on the majority Shi'a Arabs living in the country. The war then continued for six more years until 1988, when Khomeini, in his words, "drank the cup of poison" and accepted a truce mediated by the United Nations. Tens of thousands of Iranian civilians and military personnel were killed when Iraq used chemical weapons in its warfare. Iraq was financially backed by Egypt, the Arab countries of the Persian Gulf, the Soviet Union and the Warsaw Pact states, the United States (beginning in 1983), France, the United Kingdom, Germany, Brazil, and the People's Republic of China (which also sold weapons to Iran). There were more than 182,000 Kurdish victims of Iraq's chemical weapons during the eight-year war. The total Iranian casualties of the war were estimated to be between 500,000 and 1,000,000. Almost all relevant international agencies have confirmed that Saddam engaged in chemical warfare to blunt Iranian human wave attacks; these agencies unanimously confirmed that Iran never used chemical weapons during the war. Starting on 19 July 1988 and lasting for about five months the government systematically executed thousands of political prisoners across Iran. This is commonly referred to as the 1988 executions of Iranian political prisoners or the 1988 Iranian Massacre. The main target was the membership of the People's Mojahedin Organization of Iran (PMOI), although a lesser number of political prisoners from other leftist groups were also included such as the Tudeh Party of Iran (Communist Party). Estimates of the number executed vary from 1,400 to 30,000. Khamenei (1989–present) 
On his deathbed in 1989, Khomeini appointed a 25-man Constitutional Reform Council which named then president Ali Khamenei as the next Supreme Leader, and made a number of changes to Iran's constitution. A smooth transition followed Khomeini's death on June 3, 1989. While Khamenei lacked Khomeini's "charisma and clerical standing", he developed a network of supporters within Iran's armed forces and its economically powerful religious foundations. Under his reign Iran's regime is said – by at least one observer – to resemble more "a clerical oligarchy ... than an autocracy." Rafsanjani: pragmatic conservativism (1989–1997) 
Succeeding Khamenei as president on August 3, 1989 was pragmatic conservative Ali-Akbar Hashemi Rafsanjani, who served two four-year terms and focused his efforts on rebuilding Iran's economy and war-damaged infrastructure, though low oil prices hampered this endeavor. He sought to restore confidence in the government among the general population by privatizing the companies that had been nationalized in the first few years of the Islamic Republic, as well as by bringing in qualified technocrats to manage the economy. The state of their economy also influenced the government to move towards ending their diplomatic isolation. This was achieved through the reestablishment of normalized relations with neighbors such as Saudi Arabia and an attempt to improve its reputation in the region with assertions that its revolution was not exportable to other states. During the Persian Gulf War in 1991 the country remained neutral, restricting its action to the condemnation of the U.S. and allowing fleeing Iraqi aircraft and refugees into the country. Iran in the 1990s had a greater secular behavior and admiration for Western popular culture than in the previous decades. This admiration had become a way in which the urban population expressed their resentment at the invasive Islamic policies of the government. The pressures from the population placed on the new Supreme Leader Ayatollah Ali Khamenei led to an uneasy alliance between him and President Akbar Hashemi Rafsanjani. Through this alliance they attempted to hinder the ulama's ability to gain further control of the state. In 1989, they created a sequence of constitutional amendments that removed the office of prime minister and increased the scope of presidential power. However, these new amendments did not curtail the powers of the Supreme Leader of Iran in any way; this position still contained the ultimate authority over the armed forces, the making of war and peace, the final say in foreign policy, and the right to intervene in the legislative process whenever he deemed it necessary. Khatami: reformers and conservatives struggle (1997–2005) 

President Rafsanjani's economic policies led to stronger relations with the outside world. But his government's relaxation of the enforcement of certain regulations on social behavior were met with some responses of widespread disenchantment among the general population with the ulama as rulers of the country. This led to the defeat of the government's candidate for president in 1997, who had the backing of the supreme Islamic jurist. He was beaten by an independent candidate from the Reformists, Mohammad Khatami. He received 69% of the vote and enjoyed particular support from two groups of the population that had felt ostracized by the practices of the state: women and youth. The younger generations in the country had been too young to experience the shah's regime or the revolution that ended it, and now they resented the restrictions placed on their daily lives under the Islamic Republic. Mohammad Khatami's presidency was soon marked by tensions between the reform-minded government and an increasingly conservative and vocal clergy. This rift reached a climax in July 1999 when massive anti-government protests erupted in the streets of Tehran. The disturbances lasted over a week before police and pro-government vigilantes dispersed the crowds. Khatami was re-elected in June 2001 but his efforts were repeatedly blocked by the conservatives in the parliament. Conservative elements within Iran's government moved to undermine the reformist movement, banning liberal newspapers and disqualifying candidates for parliamentary elections. This clampdown on dissent, combined with the failure of Khatami to reform the government, led to growing political apathy among Iran's youth. In June 2003, anti-government protests by several thousand students took place in Tehran. Several human rights protests also occurred in 2006. Ahmadinejad: hardline conservatism (2005–2009) 
In the 2005 Iranian presidential election, Mahmoud Ahmadinejad, mayor of Tehran, became the sixth president of Iran, after winning 62 percent of the vote in the run-off poll, against former president Ali-Akbar Hashemi Rafsanjani. During the authorization ceremony he kissed Khamenei's hand in demonstration of his loyalty to him. During this time, the American invasion of Iraq, the overthrow of Saddam Hussein's regime and empowerment of its Shi'a majority, all strengthened Iran's position in the region particularly in the mainly Shi'a south of Iraq, where a top Shia leader in the week of September 3, 2006 renewed demands for an autonomous Shi'a region. At least one commentator (former U.S. Defense Secretary William S. Cohen) has stated that as of 2009 Iran's growing power has eclipsed anti-Zionism as the major foreign policy issue in the Middle East. During 2005 and 2006, there were claims that the United States and Israel were planning to attack Iran, with the most cited reason being Iran's civilian nuclear energy program which the United States and some other states fear could lead to a nuclear weapons program. China and Russia opposed military action of any sort and opposed economic sanctions. Supreme Leader Ali Khamenei issued a fatwa forbidding the production, stockpiling and use of nuclear weapons. The fatwa was cited in an official statement by the Iranian government at an August 2005 meeting of the International Atomic Energy Agency (IAEA) in Vienna. In 2009, Ahmadinejad's reelection was hotly disputed and marred by large protests that formed the "greatest domestic challenge" to the leadership of the Islamic Republic "in 30 years". The resulting social unrest is widely known as the Iranian Green Movement. Reformist opponent Mir-Hossein Mousavi and his supporters alleged voting irregularities and by 1 July 2009, 1000 people had been arrested and 20 killed in street demonstrations. Supreme Leader Ali Khamenei and other Islamic officials blamed foreign powers for fomenting the protest. Rouhani: pragmatism (2013–2021) 

On 15 June 2013, Hassan Rouhani won the presidential election in Iran, with a total number of 36,704,156 ballots cast; Rouhani won 18,613,329 votes. In his press conference one day after election day, Rouhani reiterated his promise to recalibrate Iran's relations with the world. On April 2, 2015, following eight days of tortuous discussions in Switzerland, which lasted through the night, Iran and six world powers (United States, United Kingdom, France, China and Russia plus Germany) agreed on the outlines of an understanding to limit Iran's nuclear programs, negotiators indicated, as both sides prepared for announcements. Iranian Foreign Minister Mohammad Javad Zarif tweeted: "Found solutions. Ready to start drafting immediately." European Union foreign policy chief Federica Mogherini tweeted that she would meet the press with Zarif after a final meeting of the seven nations in the nuclear talks. She wrote: "Good news." Reading out a joint statement, European Union foreign policy chief Federica Mogherini hailed what she called a "decisive step" after more than a decade of work. Iranian Foreign Minister Mohammad Javad Zarif followed with the same statement in Persian. U.S. Secretary of State John Kerry and the top diplomats of Britain, France and Germany also briefly took the stage behind them. The deal is intended to be a provisional framework for a comprehensive agreement and was signed in 2015, and marked a significant breakthrough in the 12-year history of negotiations with Iran over its nuclear programme. When Donald Trump was campaigning to become President of the US, he repeatedly said he would abandon the Iran nuclear deal. After he was elected president, the USA announced its withdrawal from the agreement on 8 May 2018. The Iranian-backed group known as Kataib Hezbollah attacked the United States embassy in Baghdad on December 31, 2019. On January 3, 2020, the United States military executed a drone strike at Baghdad Airport, killing Qasem Soleimani, the leader of the Quds Force, an elite branch of the Islamic Revolutionary Guard Corps. On 3 August 2021 Ebrahim Raisi was elected 8th President of Iran. Ebrahim Raisi (2021–) 

Beginning on 16 September 2022 protests started against the government of Iran following the death of Mahsa Amini (Jina). 