Babak Khorramdin led a revolt against the Abbasid caliphate in the mountains of Azerbaijan from about 816 to 837, the longest of the religious uprisings that followed the Arab conquest of Iran. From his fortress of Badhdh he defeated a series of caliphal armies until the Iranian general Afshin took the stronghold in 837; Babak was captured and executed at Samarra in 838.
| Persian name | بابک خرمدین (Bâbak-e Khorramdin) |
|---|---|
| Revolt | c. 816–837 |
| Base | Fortress of Badhdh (Bazz), Arasbaran mountains, East Azerbaijan |
| Movement | The Khurramiyya (Khorramdinan), “the red-clad” |
| Opponents | Caliphs al-Ma’mun and al-Mu’tasim; general Afshin of Ushrusana |
| Death | Executed at Samarra, 838 |
The Khurramis of the mountains
The Khurramiyya, in Persian Khorramdinan, “those of the joyful religion”, were rural communities spread across western and northern Iran, strongest in the Zagros and in Azerbaijan. Their beliefs come to us almost entirely through hostile Muslim writers, who describe a faith with roots in pre-Islamic Iranian religion and in the movement of Mazdak: belief in reincarnation, in the presence of the divine in their leaders, in two opposed principles of light and darkness, and a ban on harming living things except in war. The same writers accused them of sharing property and women, a charge routinely made against Iranian sects and one historians treat with caution. Many had revered Abu Muslim, and their risings followed those told on the death of Abu Muslim and the Iranian revolts. Because they dressed in red during their revolts, Arabic sources also call them the Muhammira, “the red ones”.
A herdsman becomes a leader
The fullest account of Babak’s origins, preserved by the tenth-century bibliographer Ibn al-Nadim from an earlier writer, says his father was an oil seller who died young and his mother a poor woman of a village in Azerbaijan. Babak worked as a herdsman and servant, and came into the service of Javidan, a Khurrami leader in the mountains of Badhdh. When Javidan died, around 816, his widow announced that his spirit had passed into Babak, who married her and took over the movement.
The story fits Khurrami belief in a spirit passing from leader to leader, and it may be shaped by it. The timing is clearer: Babak’s revolt began while the caliphate was still divided after the civil war between al-Amin and al-Ma’mun, described on al-Ma’mun in Merv, and Azerbaijan was a frontier region of weak government, local Arab warlords and Armenian princes.

Twenty years of war
From Badhdh, high on a ridge in the Arasbaran (Qaradagh) range south of the Aras river, Babak raided far into Azerbaijan and the Jibal. Al-Ma’mun sent army after army against him. The most serious, under Muhammad ibn Humayd al-Tusi, was destroyed in a mountain ambush in 829, and its commander killed. The poet Abu Tammam wrote an elegy for him that is still read.
The chroniclers give huge figures for the dead of the war; al-Tabari repeats a claim that Babak’s men killed more than 250,000 people over twenty years. The number cannot be checked and should be read as a measure of how much the revolt frightened Baghdad. On his deathbed in 833, al-Ma’mun is reported to have urged his brother and successor al-Mu’tasim to finish the war.
Afshin and the fall of Badhdh
Al-Mu’tasim gave the command in 835 to Khaydhar ibn Kawus, known by his hereditary title Afshin, prince of Ushrusana in Central Asia and himself of Iranian origin. Afshin fought a slow, methodical campaign, rebuilding forts along the roads, securing supplies and pushing his lines forward each season. In August 837 his army stormed Badhdh.
Babak escaped into Armenia, but the Armenian prince Sahl ibn Sunbat, with whom he sought refuge, handed him to Afshin. He was taken to the new Abbasid capital at Samarra, paraded on an elephant and, in March 838, executed: his hands and feet were cut off before he was killed, and his body displayed on a gibbet. Some of his followers had already fled west and joined the Byzantine army, and in 838 al-Mu’tasim marched against the Byzantines and sacked Amorium.
Afshin’s own end was a strange echo. In 840 he was arrested, tried in Samarra on charges that included secret loyalty to the old Iranian religion and correspondence with a rebel in Tabaristan, and died in prison the next year.
- c. 816 Javidan dies; Babak takes over the Khurramis of Badhdh
- 819–829 Several caliphal armies fail against him
- 829 Muhammad ibn Humayd al-Tusi defeated and killed
- 833 Al-Ma’mun dies; al-Mu’tasim becomes caliph
- 835 Afshin takes command
- August 837 Badhdh falls
- March 838 Babak executed at Samarra
- 840–841 Afshin tried and dies in prison
Rebel, heretic, national hero
To medieval Muslim chroniclers Babak was a heretic and a bandit. Modern views have changed sharply. In the twentieth century Iranian nationalist writers made him a hero of resistance to Arab rule, and Sa’id Nafisi’s book on him helped fix that image. In the Republic of Azerbaijan he is also celebrated as a national figure. Patricia Crone, in The Nativist Prophets of Early Islamic Iran, argued that the Khurramis were not trying to restore the Sasanian state or Zoroastrian orthodoxy, but defending a local, village religion and way of life against the advance of caliphal government and Islamic law.
The ruins near Kaleybar called Babak Castle draw visitors who climb the long path to the summit, and in recent decades groups have gathered there each summer in his memory. For the wider setting of Iranian Azerbaijan, see Tabriz, the region’s main city, and the people of Iran.
Persian words from this page
| بابک | Bâbak | Babak |
| خرمدینان | Khorramdinân | the Khurramis |
| قلعه بابک | Qal’e-ye Bâbak | Babak Castle |
| کلیبر | Kaleybar | Kaleybar |
| ارسباران | Arasbârân | Arasbaran mountains |
| افشین | Afshin | Afshin |
| آذربایجان | Âzarbâyjân | Azerbaijan |
Sources and further reading
- al-Tabari, The History of al-Tabari, vol. 33, Storm and Stress along the Northern Frontiers of the ‘Abbasid Caliphate, translated by C. E. Bosworth (SUNY Press, 1991).
- Ibn al-Nadim, The Fihrist, translated by Bayard Dodge (Columbia University Press, 1970), the section on the Khurramiyya.
- Patricia Crone, The Nativist Prophets of Early Islamic Iran (Cambridge University Press, 2012).
- “Babak Korrami” and “Korramis”, Encyclopaedia Iranica.
- Gholam Hossein Sadighi, Les mouvements religieux iraniens au IIe et au IIIe siècle de l’hégire (1938).
Want to learn Persian? Get the free Starter Pack
Get the 14-page printable Starter Pack (all 32 letters, a 7-day reading plan, 100 core words and 20 survival phrases) and a short 5-email course. Free.
More in The Arab Conquest and Early Islamic Iran (633–820 CE)
- Salman the Persian
- Why the Sasanian Empire Fell
- The Battle of the Bridge (634)
- The Battle of al-Qadisiyyah
- Rostam Farrokhzad
- The Fall of Ctesiphon
- The Battle of Jalula
- The Battle of Nahavand: “Victory of Victories”
- The Conquest of Fars, Khorasan and the East
- Peroz III and the Sasanian Exiles in China
- Iranian Resistance: Tabaristan and the Dabuyids
- Zoroastrians after the Arab Conquest
- Iran under the Umayyads
- The Mawali and the Shu’ubiyya Movement
- Abu Muslim and the Abbasid Revolution
- The Death of Abu Muslim and the Iranian Revolts
- The Barmakids: Persian Viziers of Baghdad
- Al-Ma’mun in Merv and the Civil War
- Tahir ibn Husayn
- Imam Reza and the Origins of Mashhad
- Babak Khorramdin’s Revolt
- Persian Influence on the Abbasid Caliphate
- The Birth of New Persian