Safavid Iran was one of the largest and longest-lasting Iranian empires, ruled by the Safavid dynasty from 1501 to 1736,Helen Chapin Metz, ed., Iran, a Country study. 1989. University of Michigan, p. 313.Emory C. Bogle. Islam: Origin and Belief. University of Texas Press. 1989, p. 145.Stanford Jay Shaw. History of the Ottoman Empire. Cambridge University Press. 1977, p. 77. albeit others place the end on the year 1722, when Isfahan fell to the Afghans.

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 descentpractically 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 (died 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.: "The Safavid kings called themselves, among other appellations, the "heart of the shrine of ʿAli" (kalb-e āstān-e ʿAli), while assuming the title of Šāhanšāh (the king of kings) of Persia/Iran"....... "Even Ottoman sultans, when addressing the Āq Quyunlu and Safavid kings, used such titles as "the king of kings of Iran, the lord of the Persians" or the "holders of the glory of Jamšid and the vision of Faridun and the wisdom of Dārā." They addressed Shah Esmaʿil as: "the king of Persian lands and the heir to Jamšid and Kay-ḵosrow". ....... During Shah ʿAbbās's reign the transformation is complete and Shiʿite Iran comes to face the two adjacent Sunni powers: the Ottoman Empire to the west and the Kingdom of Uzbeks to the east."

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.