The Guarded Domains of Iran, commonly called Safavid Iran, Safavid Persia or the Safavid Empire, was one of the largest and longest-lasting Iranian empires. It was ruled by the Safavid dynasty from 1501 to 1736, albeit others place the end on the year 1722, when Isfahan fell to the Afghans. It is often considered the beginning of modern Iranian history, as well as one of the gunpowder empires.
Shah Ismail I established Twelver Shi'ism as the official religion of the empire, marking one of the most important turning points in the history of Islam.
A dynasty rooted in the Safavid order, a dervish order of Sufism, founded by sheikhs of native Iranian (possibly Kurdish) origin, it was not only Persian-speaking, but also Turkic-speaking and Turkified. From their base in Ardabil, the Safavids established control over parts of Greater Iran and reasserted the Iranian identity of the region, thus becoming the first native dynasty since the Buyids to establish a national state officially known as Iran.

The main group that contributed to bringing the Safavids to power were the Qizilbash (lit. 'red-heads'), who are made up of Turkoman tribes. Meanwhile, ethnic Iranians, including the Shahs, held the positions in the bureaucracy and cultural affairs, leading the empire politically as the administrative and religious elite. In the 17th century, Armenian, Georgian, and Circassian gholams (slave-soldiers) emerged as the "Third Force" and became the primary military authority until the fall of the Safavids.
The Safavids ruled from 1501 to 1722 (experiencing a brief restoration from 1729 to 1736 and 1750 to 1773) and, at their height, they controlled all of what is now Iran, Azerbaijan, Armenia, eastern Georgia, parts of the North Caucasus including Russia, and Iraq, as well as parts of Turkey, Syria, Pakistan, Afghanistan, Turkmenistan, and Uzbekistan.
Despite their demise in 1736, the legacy that they left behind was the revival of Iran as an economic stronghold between East and West, the establishment of an efficient state and bureaucracy based upon "checks and balances", their architectural innovations, and patronage for fine arts. The Safavids have also left their mark down to the present era by establishing Twelver Shi'ism as the state religion of Iran, as well as spreading Shia Islam in major parts of Central Asia, Caucasus, Anatolia, the Persian Gulf, and Mesopotamia.

The Safavid dynasty is considered a turning point in the history of Iran after the Muslim conquest of Persia, as after centuries of rule by non-Iranian kings, the country became an independent power in the Islamic world.
Names
The Guarded Domains of Iran was the common and official name of the Safavid realm, and it remained the country's official title under subsequent rulers until 1924. The idea of the Guarded Domains illustrated a feeling of territorial and political uniformity in a society where the Persian language, culture, monarchy, and Shia Islam became integral elements of the developing national identity. The concept presumably had started to form under the Ilkhanate in the late 13th century, contributing to the establishment of the early modern Persianate society. Its shortened form was mamalik-i Iran ("Kingdom of Iran"), and it also had other variants, such as mamalik-i mahrusa-yi khusravani ("the Royal Guarded Domains") and mamalik-i mahrusa-yi humayun ("the Imperial Guarded Domains").; It was also often shortend as Iran.
The phrase mulk-i vasi' al-faza-yi Iran ("the expansive realm of Iran") is used in both the 17th-century chronicle Khold-e barin and the 1680s travelogue Safine-ye Solaymani by the Safavid ambassador to the Ayutthaya Kingdom. This recurring expression highlights the authors' pride and recognition of their homeland. This expression is likely the appropriate Persian way to describe an "empire" in the writings of that period.

Background
Safavid history begins with the establishment of the Zahediyeh Sufi order in Gilan by its eponymous founder Zahed Gilani. Having no male heir, Zahed married his daughter to his favorite disciple, Safi al-Din Ardabili, and appointed him as the spiritual successor of the Zahediyeh order. Safi al-Din succeeded him upon his death in 1301, and through his great spiritual charisma, the Zahediyeh order gained enormous influence in the city of Ardabil—Hamdullah Mustaufi noted that most of the people of Ardabil were followers of Safi al-Din. Consequently, the Zahediyeh gradually became known as the Safaviyya, after the more widely known Safi al-Din.
Religious poetry from Safi al-Din, written in the Old Azari language—a now-extinct Northwestern Iranian language—and accompanied by a paraphrase in Persian that helps its understanding, has survived to this day and has linguistic importance.
After Safī al-Dīn, the leadership of the Safaviyya passed to Sadr al-Dīn Mūsā († 794/1391–92). The order at this time was transformed into a religious movement that conducted religious propaganda throughout Iran, Syria and Asia Minor, and most likely had maintained its Sunni Shafi'ite origin at that time. The leadership of the order passed from Sadr ud-Dīn Mūsā to his son Khvajeh Ali Safavi († 1429) and in turn to his son Ibrāhīm († 1429–1447).

When Shaykh Junayd, the son of Ibrāhim, assumed the leadership of the Safaviyya in 1447, the history of the Safavid movement was radically changed. According to historian Roger Savory, "Sheikh Junayd was not content with spiritual authority and he sought material power." At that time, the most powerful dynasty in Iran was that of the Qara Qoyunlu, the "Black Sheep", whose ruler Jahan Shah ordered Junāyd to leave Ardabil or else he would bring destruction and ruin upon the city. Junayd sought refuge with the rival of Kara Koyunlu Jahan Shah, the Aq Qoyunlu (White Sheep Turkomans) Khan Uzun Hassan, and cemented his relationship by marrying Uzun Hassan's sister, Khadija Begum. Junayd was killed during an incursion into the territories of the Shirvanshah and was succeeded by his son Haydar Safavi.
Haydar married Alamshah Halime Begum, Uzun Hassan's daughter, possibly named "Martha", who gave birth to Ismail I, founder of the Safavid dynasty. Martha's mother Theodora—better known as Despina Khatun—was a Pontic Greek princess, the daughter of the Grand Komnenos John IV of Trebizond. She had been married to Uzun Hassan in exchange for protection of the Grand Komnenos from the Ottomans.
After Uzun Hassan's death, his son Ya'qub felt threatened by the growing Safavid religious influence. Ya'qub allied himself with the Shirvanshah and killed Haydar in 1488. By this time, the bulk of the Safaviyya were nomadic Oghuz Turkic-speaking clans from Asia Minor and Azerbaijan and were known as Qizilbash "Red Heads" because of their distinct red headgear. The Qizilbash were warriors, spiritual followers of Haydar, and a source of the Safavid military and political power.

After the death of Haydar, the Safaviyya gathered around his son Ali Mirza Safavi, who was also pursued and subsequently killed by Ya'qub. According to official Safavid history, before dying, Ali had designated his young brother Ismail as the spiritual leader of the Safaviyya.
History
Founding of the dynasty by Shah Ismail I (r. 1501–1524)
Iran prior to Ismail's rule
Following the decline of the Timurid Empire (1370–1506), Iran was politically fragmented, giving rise to numerous religious movements. The demise of Timur's political authority created a space in which several religious communities, particularly Shiʻi ones, could come to the fore and gain prominence. Among these were several Sufi brotherhoods, the Hurufis, Nuqtavis and the Musha'sha'i. Among these movements, the Qizilbash was the most politically resilient, and, owing to its success, Ismail I gained political prominence in 1501. There were many local states before the state established by Ismail. The most important local rulers about 1500 were:
Huṣayn Bāyqarā, the Timurid sultan of Herat

Alwand Mīrzā, Khan of the Aq Qoyunlu of Tabriz
Murad Beg, Aq Qoyunlu ruler of Persian Iraq
Farrokh Yaṣar, the Shirvanshah
Badi Alzamān Mīrzā, local ruler of Balkh
Huṣayn Kiyā Chalavī, the Kar-Kiya ruler of Semnan
Murād Beg Bayandar, local ruler of Yazd
Mahmud ibn Nizām al-Dīn Yahyá, Mihrabanid malek of Sistan
Several local rulers of Mazandaran and Gilan, such as Bisotun II, Ashraf ibn Taj al-Dawla, Mirza Ali, and Kiya Husayn II.
Ismail was able to unite all these lands under his empire.
Rise of Shāh Ismail I
The Safavid dynasty was founded about 1501 by Shah Ismail I, the sheikh of Safavid order and a direct descendant of its eponymous founder, sheikh Safi ad-Din Ardabili. His background is disputed: Different historians have contending claims regarding the ethnic origin of Safi ad-Din. Hinz [de] states that he was Arab, Ayalon claims he was Turkic, Kasravi asserts he was Iranian, and Togan argues he was Kurdish but had completely Turkified by the time of Ismail. Gelvin and Lapidus also argue that he was of Kurdish origin. Savory and Gündüz [tr] have pointed out that the source text regarding Sheikh Safi al-Din's ethnic origin contains factual inaccuracies. According to Roemer [de], the Safavid Shah represented a lineage that combined both Turkmen and Iranian ancestry. Therefore, the question of whether the dynasty's founder, Sheikh Safi, was of Iranian, or seyyed descent is irrelevant. Due to the marriages of Safavid family with their dignitaries, Ismail also had Turkoman, Georgian and Pontic Greek ancestry. The language Ismail used is not identical with that of his "race" or "nationality" and he was bilingual from birth.
As such, he was the last in the line of hereditary grand masters of the Safaviyeh order, prior to its ascent to a ruling dynasty. Ismail was known as a brave and charismatic youth, zealous with regards to his faith in Shia Islam, and believed himself to be of divine descent – practically worshipped by his Qizilbash followers.
In 1500, Ismail I invaded neighboring Shirvan to avenge the death of his father, Sheik Haydar, who was murdered in 1488 by the Shah of Shirvan, Farrukh Yasar. Afterwards, Ismail went on a conquest campaign, capturing Tabriz in July 1501, where he enthroned himself the Shah of Azerbaijan, proclaimed himself King of Kings (shahanshah) of Iran and minted coins in his name, proclaiming Twelver Shi'ism as the official religion of his domain. The establishment of Twelver Shi'ism as the state religion of Safavid Iran led to various Ṣufi orders (tariqa) openly declaring their Shi'ite position, and others to promptly assume Shia Islam. Among these, the founder of one of the most successful Ṣufi orders, Shah Nimatullah Wali (d. 1431), traced his descent from the first Ismaili Imam, Muhammad ibn Ismail, as evidenced in a poem as well as another unpublished literary composition. Although Shah Nimatullah was a Sunni Muslim, the future sheikhs of the Ni'matullāhī order declared adherence to Shia Islam after the rise of the Safavid dynasty.
Although Ismail I initially gained mastery over Azerbaijan alone, the Safavids ultimately won the struggle for power over all of Iran, which had been going on for nearly a century between various dynasties and political forces. A year after his victory in Tabriz, Ismail I claimed most of Iran as part of his territory, and within 10 years established a complete control over all of it. Ismail followed the line of Iranian and Turkmen rulers prior to his assumption of the title "Padishah-i-Iran", previously held by Uzun Hasan and many other Iranian kings. The Ottoman sultans addressed him as the king of Iranian lands and the heir to Jamshid and Kai Khosrow.
Having started with just the possession of Azerbaijan, Shirvan, southern Dagestan (with its important city of Derbent), and Armenia in 1501, Erzincan and Erzurum fell into his power in 1502, Hamadan in 1503, Shiraz and Kerman in 1504, Diyarbakır, Najaf, and Karbala in 1507, Van in 1508, Baghdad in 1509, and Herat, as well as other parts of Khorasan, in 1510. In 1503, the kingdoms of Kartli and Kakheti were made his vassals as well. By 1511, the Uzbeks in the north-east, led by their Khan Muhammad Shaybani, were driven far to the north, across the Oxus River, where they continued to attack the Safavids. Ismail's decisive victory over the Uzbeks, who had occupied most of Khorasan, ensured Iran's eastern borders, and the Uzbeks never since expanded beyond the Hindu Kush. Although the Uzbeks continued to make occasional raids into Khorasan, the Safavid empire was able to keep them at bay throughout its reign.
Start of clashes with the Ottomans
More problematic for the Safavids was the powerful neighboring Ottoman Empire. The Ottomans, a Sunni dynasty, considered the active recruitment of Turkmen tribes of Anatolia for the Safavid cause as a major threat. To counter the rising Safavid power, in 1502, Sultan Bayezid II forcefully deported many Shiʻite Muslims from Anatolia to other parts of the Ottoman realm. In 1511, the Şahkulu rebellion was a widespread pro-Shia and pro-Safavid uprising directed against the Ottoman Empire from within the empire. Furthermore, by the early 1510s Ismail's expansionistic policies had pushed the Safavid borders in Asia Minor even more westwards. The Ottomans soon reacted with a large-scale incursion into Eastern Anatolia by Safavid ghazis under Nur-Ali Khalifa. This action coincided with the accession to the Ottoman throne in 1512 of Sultan Selim I, Bayezid II's son, and it was the casus belli leading to Selim's decision to invade neighbouring Safavid Iran two years later.
In 1514, Sultan Selim I marched through Anatolia and reached the plain of Chaldiran near the city of Khoy, where a decisive battle was fought. Most sources agree that the Ottoman army was at least double the size of that of Ismāʻil; furthermore, the Ottomans had the advantage of artillery, which the Safavid army lacked. According to historian Roger Savory, "Salim's plan was to winter at Tabriz and complete the conquest of Persia the following spring. However, a mutiny among his officers who refused to spend the winter at Tabriz forced him to withdraw across territory laid waste by the Safavid forces, eight days later". Although Ismail was defeated and his capital was captured, the Safavid empire survived. The war between the two powers continued under Ismail's son, Emperor Tahmasp I, and the Ottoman Sultan Suleiman the Magnificent, until Shah Abbas retook the area lost to the Ottomans by 1602.
The consequences of the defeat at Chaldiran were also psychological for Ismail: the defeat destroyed Ismail's belief in his invincibility, based on his claimed divine status. His relationships with his Qizilbash followers were also fundamentally altered. The tribal rivalries among the Qizilbash, which temporarily ceased before the defeat at Chaldiran, resurfaced in intense form immediately after the death of Ismail, and led to ten years of civil war (930–040/1524–1533) until Shah Tahmasp regained control of the affairs of the state. For most of the last decade of Ismail's reign, the domestic affairs of the empire were overseen by the Tajik vizier Mirza Shah Hossein until his assassination in 1523. The Chaldiran battle also holds historical significance as the start of over 300 years of frequent and harsh warfare fueled by geo-politics and ideological differences between the Ottomans and the Iranian Safavids (as well as successive Iranian states) mainly regarding territories in Eastern Anatolia, the Caucasus, and Mesopotamia.
Early Safavid power in Iran was based on the military power of the Qizilbash. Ismail exploited the first element to seize power in Iran. But eschewing politics after his defeat in Chaldiran, he left the affairs of the government to the office of the wakil (chief administrator, vakil in Persian). Ismail's successors, most manifestly Shah Abbas I, successfully diminished the influence of the Qizilbash on the affairs of the state.
Shah Tahmasp (r. 1524–1576)
Civil strife during Tahmasp's early reign
Shāh Tahmasp, the young titular governor of Khorasan, succeeded his father Ismail in 1524, when he was ten years and three months old. The succession was evidently undisputed. Tahmasp was the ward of the powerful Qizilbash amir Ali Beg Rumlu (titled "Div Soltān Rumlu") who saw himself as the de facto ruler of the state. Rūmlū and Kopek Sultān Ustajlu (who had been Ismail's last wakīl) established themselves as co-regents of the young shah. The Qizilbash, which still suffered under the legacy of the battle of Chaldiran, was engulfed in internal rivalries. The first two years of Tahmasp's reign was consumed with Div Sultān's efforts to eliminate Ustajlu from power. This court intrigue lead directly to tribal conflict. Beginning in 1526 periodic battles broke out, beginning in northwest Iran but soon involving all of Khorasan. In the absence of a charismatic, messianic rallying figure like the young Ismail, the tribal leaders reclaimed their traditional prerogative and threatened to return to the time of local warlords. For nearly 10 years rival Qizilbash factions fought each other. Af first, Kopek Sultan's Ustajlu tribe suffered the heaviest, and he himself was killed in a battle.
Thus Div Soltān emerged victorious in the first palace struggle, but he fell victim to Chuha Sultan of the Takkalu, who turned Tahmasp against his first mentor. In 1527 Tahmasp demonstrated his desire by shooting an arrow at Div Soltan before the assembled court. The Takkalu replaced the Rumlu as the dominant tribe. They in turn would be replaced by the Shamlu, whose amir, Husain Khan, became the chief adviser. This latest leader would only last until 1534, when he was deposed and executed.
At the downfall of Husain Khan, Tahmasp asserted his rule. Rather than rely on another Turkmen tribe, he appointed a Persian wakīl. From 1553 for forty years the shah was able to avoid being ensnared in tribal treacheries. But the decade of civil war had exposed the empire to foreign danger and Tahmasp had to turn his attention to the repeated raids by the Uzbeks.
Foreign threats to the Empire
The Uzbeks, during the reign of Tahmasp, attacked the eastern provinces of the kingdom five times, and the Ottomans under Soleymān I invaded Iran four times. Decentralized control over Uzbek forces was largely responsible for the inability of the Uzbeks to make territorial inroads into Khorasan. Putting aside internal dissension, the Safavid nobles responded to a threat to Herat in 1528 by riding eastward with Tahmasp (then 17) and soundly defeating the numerically superior forces of the Uzbeks at Jam. The victory resulted at least in part from Safavid use of firearms, which they had been acquiring and drilling with since Chaldiran.
Notwithstanding the success with firearms at Jam, Tahmasp still lacked the confidence to engage their archrivals the Ottomans, choosing instead to cede territory, often using scorched earth tactics in the process. The goal of the Ottomans in the 1534 and 1548–1549 campaigns, during the 1532–1555 Ottoman–Safavid War, was to install Tahmasp's brothers (Sam Mirza and Alqas Mirza, respectively) as shah in order to make Iran a vassal state. Although in those campaigns (and in 1554) the Ottomans captured Tabriz, they lacked a communications line sufficient to occupy it for long. Nevertheless, given the insecurity in Iraq and its northwest territory, Tahmasp moved his court from Tabriz to Qazvin.
In the gravest crisis of Tahmasp's reign, Ottoman forces in 1553–54 captured Yerevan, Karabakh and Nakhjavan, destroyed palaces, villas and gardens, and threatened Ardabil. During these operations an agent of the Samlu (now supporting Sam Mizra's pretensions) attempted to poison the shah. Tahmasp resolved to end hostilities and sent his ambassador to Soleyman's winter quarters in Erzurum in September 1554 to sue for peace. Temporary terms were followed by the Peace of Amasya in June 1555, ending the war with the Ottomans for the next two decades. The treaty was the first formal diplomatic recognition of the Safavid Empire by the Ottomans. Under the Peace, the Ottomans agreed to restore Yerevan, Karabakh and Nakhjavan to the Safavids and in turn would retain Mesopotamia (Iraq) and eastern Anatolia. Soleyman agreed to permit Safavid Shia pilgrims to make pilgrimages to Mecca and Medina as well as tombs of imams in Iraq and Arabia on condition that the shah would abolish the taburru, the cursing of the first three Rashidun caliphs. It was a heavy price in terms of territory and prestige lost, but it allowed the empire to last, something that seemed improbable during the first years of Tahmasp's reign.
Royal refugees: Bayezid and Humayun
Almost simultaneously with the emergence of the Safavid Empire, the Mughal Empire, founded by the Timurid heir Babur, was developing in South-Asia. The Mughals adhered to Sunni Islam while ruling a largely Hindu population. After the death of Babur, his son Humayun was ousted from his territories and threatened by his half-brother and rival, who had inherited the northern part of Babur's territories. Having to flee from city to city, Humayun eventually sought refuge at the court of Tahmasp in Qazvin in 1543. Tahmasp received Humayun as the true emperor of the Mughal dynasty, despite the fact that Humayun had been living in exile for more than fifteen years. After Humayun converted to Shiʻi Islam (under extreme duress), Tahmasp offered him military assistance to regain his territories in return for Kandahar, which controlled the overland trade route between central Iran and the Ganges. In 1545 a combined Iranian–Mughal force managed to seize Kandahar and occupy Kabul. Humayun handed over Kandahar, but Tahmasp was forced to retake it in 1558, after Humayun seized it on the death of the Safavid governor.
Humayun was not the only royal figure to seek refuge at Tahmasp's court. A dispute arose in the Ottoman Empire over who was to succeed the aged Suleiman the Magnificent. Suleiman's favourite wife, Hürrem Sultan, was eager for her son, Selim, to become the next sultan. But Selim was an alcoholic and Hürrem's other son, Bayezid, had shown far greater military ability. The two princes quarrelled and eventually Bayezid rebelled against his father. His letter of remorse never reached Suleiman, and he was forced to flee abroad to avoid execution. In 1559 Bayezid arrived in Iran where Tahmasp gave him a warm welcome. Suleiman was eager to negotiate his son's return, but Tahmasp rejected his promises and threats until, in 1561, Suleiman compromised with him. In September of that year, Tahmasp and Bayezid were enjoying a banquet at Tabriz when Tahmasp suddenly pretended he had received news that the Ottoman prince was engaged in a plot against his life. An angry mob gathered and Tahmasp had Bayezid put into custody, alleging it was for his own safety. Tahmasp then handed the prince over to the Ottoman ambassador. Shortly afterwards, Bayezid was killed by agents sent by his own father.
Legacy of Shah Tahmasp
When the young Shah Tahmasp took the throne, Iran was in a dire state. But in spite of a weak economy, a civil war and foreign wars on two fronts, Tahmasp managed to retain his crown and maintain the territorial integrity of the empire (although much reduced from Ismail's time). During the first 30 years of his long reign, he was able to suppress the internal divisions by exerting control over a strengthened central military force. In the war against the Uzbeks he showed that the Safavids had become a gunpowder empire. His tactics in dealing with the Ottoman threat eventually allowed for a treaty which preserved peace for twenty years.
In cultural matters, Tahmasp presided the revival of the fine arts, which flourished under his patronage. Safavid culture is often admired for the large-scale city planning and architecture, achievements made during the reign of later shahs, but the arts of persian miniature, book-binding and calligraphy, in fact, never received as much attention as they did during his time.
Tahmasp also planted the seeds that would, unintentionally, produce change much later. During his reign he had realized while both looking to his own empire and that of the neighboring Ottomans, that there were dangerous rivalling factions and internal family rivalries that were a threat to the heads of state. Not taken care of accordingly, these were a serious threat to the ruler, or worse, could bring the fall of the former or could lead to unnecessary court intrigues. According to Colin Mitchell, for Tahmasp, the problem circled around the military tribal elite of the empire, the Qezelbāš, who believed that physical proximity to and control of a member of the immediate Safavid family guaranteed spiritual advantages, political fortune, and material advancement. Despite that Tahmasp could nullify and neglect some of his consternations regarding potential issues related to his family by having his close direct male relatives such as his brothers and sons routinely transferred around to various governorships in the empire, he understood and realized that any long-term solutions would mainly involve minimizing the political and military presence of the Qezelbāš as a whole. According to Encyclopædia Iranica, his father and founder of the Empire, Ismail I, had begun this process on a bureaucratic level as he appointed a number of prominent Persians in powerful bureaucratic positions, and one can see this continued in Tahmasp's lengthy and close relationship with the chief vizier, Qażi Jahan of Qazvin, after 1535. While Persians continued to fill their historical role as administrators and clerical elites under Tahmasp, little had been done so far to minimize the military role of the Qezelbāš.
Therefore, in 1540, Shah Tahmasp started the first of a series of invasions of the Caucasus region, both meant as a training and drilling for his soldiers, as well as mainly bringing back massive numbers of Christian Circassian and Georgian slaves, who would form the basis of a military slave system, alike to the janissaries of the neighbouring Ottoman Empire, as well as at the same time forming a new layer in Iranian society composed of ethnic Caucasians.