The Turko-Mongol rulers of Iran generally derived their power from tribal confederations that were notoriously fractious and undisciplined. Their principalities also tended to be patrimonial in nature; that is, territories and resources were shared among members of the ruling family and their retainers, with the head of the family as at least a nominal overlord. In terms of sentiments of loyalty and commonality of interests, the gulf between the ruling elites and the subject peoples was very great. All this made it difficult for any of the Turko-Mongols to construct a state that would be both centralized and durable, and virtually impossible to create anything resembling a unified nation. Instead, the characteristics of the period were incessant warfare, skirmishing among contenders for authority, and political instability. This changed dramatically with the rise of the Safavids ( a.d. 1501–1722), under whose rule Iran began to take on the shape and character of the country we recognize today.

What might well be called the Safavid revolution took place against the background of the struggles of the Timurids, Black Sheep, and White Sheep in northwestern Iran. The eponym of the dynasty was a certain Safi -od-Din ( a.d. 1252–1334), the spiritual leader of a Sufi religious order based at Ardabil. Gradually, and through a process that is still not well understood by modern historians, this order became increasingly esoteric in its religious teachings as well as militant and political in its objectives, carrying out a propaganda mission ( da‘vat ) to bring about rule by Safi -od-Din’s descendants. The movement was particularly successful in winning the support of dissident Turkish tribes in Azerbaijan, so much so that the Black Sheep ruler Jahân Shâh threatened to destroy Ardabil. During the Black Sheep ascendancy, the Safavids had allied with the White Sheep; but once the White Sheep were in power, they, too, felt endangered by the Safavids, turned against them, and arrested the leading members of the family in a.d. 1494. One Safavid, the seven- years-old Esmâ‘il, somehow made his way to Gilân, where he was given refuge by a sympathetic local ruler.

In a.d. 1499, Esmâ‘il returned to Ardabil, and thousands of Turkish warriors from many different tribes rallied to his side. Known as qezelbâsh (“red hats”) because of the symbolic headgear they wore, they were enthusiastic supporters of the religious ideology of the Safavid order, which at that time apparently included the belief that Esmâ‘il was an infallible incarnation of the divinity and could make them invincible in battle. In a.d. 1501, Esmâ‘il’s forces defeated a much larger White Sheep army at the Battle of Sharur, a victory that gave the Safavids control of Azerbaijan. Esmâ‘il immediately entered Tabriz, proclaimed himself ruler with the ancient Iranian title of shah (king), and declared Imami Shi‘ism as the official religion. By a.d. 1510, he had conquered the whole of Iran and was giving every indication that he wanted to expand his territory still further. He had also made two powerful enemies in the Ozbek Turks to the east and the Ottoman Turks to the west. A Safavid attempt to cross the Oxus was repelled by the Ozbeks in a.d. 1512, and in a.d. 1514 the Ottomans soundly defeated Esmâ‘il at the Battle of Chaldirân. These defeats ended whatever ambitions Esmâ‘il may have had to restore a Timurid-style empire and shattered the qezelbâsh faith in the Safavid ruler as godlike and invincible. They did not, however, threaten the existence of the Safavid state itself; if anything, they accelerated the process of its acquiring its own distinctive territorial and cultural identity.

After Esmâ‘il’s death in a.d. 1524, his young son Tahmâsp faced the problems of fending off foreign enemies and controlling the qezelbâsh army without the charismatic authority enjoyed by earlier Safavid leaders (although the prestige of the family was still great since it claimed descent from a Shi‘ite Imam). Among other things, Tahmâsp sought alliances with foreign powers in Europe and India, moved his capital from Tabriz to the safer location of Qazvin, signed a peace treaty with the Ottomans, and resisted Ozbek attacks. He made a conspicuous effort to cultivate the favor of Shi‘ite religious scholars; even though this inevitably meant giving up some of his own claim to religious authority, it helped assure the support of this important and influential element in society. He also began the process of building up a corps of slave-troops ( gholâm ) composed of recruits from the non-Muslim population of the Caucasus (Circassians, Armenians, and Georgians) as a counterweight to the military might of the qezelbâsh. Tahmâsp’s strategies were not entirely successful, but they at least enabled him to keep his throne for some 52 years. Once he died (poisoned by the mother of one of his sons in a conspiracy to bring her child to the throne), the power struggle among the qezelbâsh, gholâm, Persian (Tâjik), and court factions came into the open. The next 12 years were marked by internal conflicts and defeats at the hands of Ottomans and Ozbeks. In a.d. 1588, in the course of a civil war, one of the qezelbâsh commanders installed the young Safavid prince ‘Abbâs as shah. ‘Abbâs soon managed to eliminate his former patron and initiated an array of policies that carried the power of the monarch and Safavid Iran to an unprecedented level. Among other things, he expanded the gholâm forces and began to entrust them with high military posts and administrative duties; he also created a salaried standing army, including riflemen and artillery units, that would be under his command rather than that of qezelbâsh tribal officers. This was financed by reorganizing the system of fiscal administration so that the revenue from certain provinces went directly to the crown rather than being used by the tribal forces based in them. The revitalized Safavid army was able to push back the Ozbeks in a.d. 1598, recapture territory from the Ottomans in a.d. 1607, and force the Ottomans out of Iraq in a.d. 1624. ‘Abbâs also stimulated the Safavid economy by opening contacts with European countries and encouraging Armenian merchants to settle in a suburb of his new capital, Isfahan.

Unfortunately, the successors of Shah ‘Abbâs the Great lacked his skills and energy, and Safavid Iran began a slow but steady decline. Harem intrigues, oppressive taxation, neglect of the army, and an increasingly xenophobic and religiously intolerant atmosphere all played a role in weakening the state. In a.d. 1722, a fairly small band of Ghilzai Afghans led by Mir Mahmud crossed into Iran, marched almost unopposed to Isfahan, and besieged the city. With the capital on the point of starvation, Shah Soltân-Hosayn had little choice but to surrender and yield his crown to the Afghan commander.

Just as the Afghans had lacked the strength to capture Isfahan outright, they also lacked the ability to hold together the territory they had acquired. Opposition to the Afghan occupation rallied under one of the surviving Safavid princes (39 members of the family had been murdered by Mir Mahmud), Tahmâsp II, who was assisted by a particularly capable leader of the Afshâr tribe of Turkomans, Nâder-qoli Khân. With the help of Nâder and his forces, Tahmâsp recovered control of Khorâsân and defeated the Afghan army in three successive battles ( a.d. 1729–30); he was also able to push back the Ottoman Turks, who had taken advantage of the turmoil in Iran to seize Azerbaijan and Iraq. Tahmâsp had thus recovered most of the Safavid Kingdom by allowing Nâder to act as his “sultan,” but in a.d. 1731 he made the mistake of attempting to lead an army himself against the Ottomans and was soundly defeated. This gave Nâder the opportunity to depose Tahmâsp. At first, Nâder acted as regent for Tahmâsp’s infant son, but in a.d. 1736, at a carefully orchestrated assembly of notables (modeled on the Mongol kuriltay ), he proposed to retire and asked the assembly to decide who should be shah. The assembly proclaimed that he himself should become ruler; feigning reluctance, Nâder agreed to accept on condition that the assembly accept his new religious policy of restoring Sunni Islam in Iran. The abandonment of Shi‘ism was necessary as the linchpin of a peace treaty he wanted to conclude with the Sunni Ottomans and was probably intended also as a way of diminishing the religious prestige of the Safavid house and of making Nâder a more attractive figure to the Sunni populations of areas he was planning to conquer. As shah, Nâder’s career was in many ways phenomenal: he took the Ghilzai stronghold of Qandahâr ( a.d. 1738), invaded Moghul India and captured Delhi ( a.d. 1739), conquered Khârazm ( a.d. 1740), set out to recover formerly Safavid territories in the Caucasus and Caspian littoral that had been overrun by the Russians ( a.d. 1741), and renewed the war with the Ottomans ( a.d. 1743). At the same time, Nâder’s religious policy and exorbitant taxes fueled discontent in Iran itself; there was an attempt to assassinate him in a.d. 1741, and there were numerous revolts aimed at bringing about a Safavid restoration. Nâder became ever crueler and more erratic in his behavior and was finally murdered in a.d. 1747 by some of his own officers who feared he was about to have them executed.

The Afsharid Dynasty founded by Nâder Shah became after his death nothing more than a short-lived regional power in eastern Iran with no rulers of any distinction. Authority over the rest of Iran was contested by various rivals, mostly defectors from the Afshârid army, of whom the most important proved to be Karim Khân, a soldier from an Iranian tribal group known as the Zand. Nâder had deported the Zand from their homeland in the central Zagros to Khorâsân in a.d. 1732; Karim Khân led them back after Nâder’s death. By political skill even more than military prowess, Karim Khân had made himself master of all Iran except Khorâsân by a.d. 1765. However, Karim Khân never took the title shah for himself. From a.d. 1751 to 1759, he had acted as vakil (agent) for the Safavid pretender Esmâ‘il III; in a.d. 1759, he deposed Esmâ‘il because of the latter’s gross incompetence and ingratitude. Karim Khân thereafter described his position as vakil-or-ra‘âyâ (agent on behalf of the people). In fact, Karim Khân does seem to have conducted himself in the spirit of someone who felt he had been entrusted with the welfare of the people. He rarely engaged in military adventures or used harsh measures against opponents; he concentrated on developing agriculture, trade, and commercial activities. Most of his time was spent in Shiraz, which served as his capital and which he beautified with many famous buildings. His reign ( a.d. 1750–79) is remembered by Iranians as a period of exceptional peace, prosperity, and justice.

Among the groups most hostile towards Karim Khân had been the tribal confederation of the Qâjârs, another of the Turkoman qezelbâsh elements in the earlier Safavid army. Their chief, Mohammad-Hosayn Khân, had besieged Shiraz in a.d. 1758 only to be outdone by Karim Khân, who had denuded the countryside of provisions and bribed elements of the Qâjâr army into deserting. After this defeat, Mohammad-Hosayn Khân had been murdered by the leader of a rival branch of the Qâjâr tribe. Karim Khân held Mohammad-Hosayn Khân’s oldest son, Âghâ Mohammad Khân, as a kind of hostage, albeit a very well-treated one, at his court. Much earlier (in a.d. 1747), the five-year-old Âghâ Mohammad had been captured and castrated by the Afshârid ‘Âdel Shâh. There is little doubt Âghâ Mohammad was seething with rage at both this indignity and his captivity in Shiraz, despite Karim Khân’s kind treatment of him, and that he channeled this anger into a relentless and ruthless drive for power. He escaped from Shiraz after Karim Khân’s death, returned to his tribal homeland near the southeastern shores of the Caspian, asserted his leadership over the Qâjâr tribe, and took advantage of succession disputes among the Zand to expand his tribal lands at their expense. By a.d. 1789, he was in control of the north of Iran and made Tehran his capital. In a.d. 1792, he took Shiraz (thanks to the treachery of the city’s governor) and chased the last of the Zand rulers, Lotf-‘Ali Khân, to Kermân. When that city fell in a.d. 1794, the whole population is said to have been enslaved, blinded, or killed. He was crowned as shah in a.d. 1796 and set out to recover Khorâsân and to expel Russian forces from the Caucasus. While preparing to invade Georgia in a.d. 1797, Âghâ Mohammad was murdered by three of his servants, perhaps as part of a plot by one of his generals. He had, however, had the foresight to make elaborate arrangements for the succession in the event of his death, and his nephew ascended the throne as Fath-‘Ali Shah ( a.d. 1797–1834).