Bฤbak Khorramdin was one of the main Iranian revolutionary leaders of the Iranian Khorram-Dinฤn, which was a local freedom movement fighting the Abbasid Caliphate. Khorramdin appears to be a compound analogous to
dorustdin "orthodoxy" and
Behdin "Good Religion" (Zoroastrianism), and are considered an offshoot of neo-Mazdakism. 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. Babak's uprising showed the continuing strength in Azerbaijan of ancestral Iranian local feelings.