The Khurramites (Persian: خُرّّمدينانKhorrām-Dīnān lit "followers of the mirthful religion" or Arabic: خُرَّميهKhurrāmīyah) were an Iranian religious and political movement which appeared in Āzarbāyjān and the rest of Iran in 814. An alternative name for the movement is Surkhjāmegān (سرخ جامگان lit. those who wear red clothes) or its Arabic equivalent Muhammira - "those who wear a red headgear" - a reference to their symbolic red headgear.
The sect grew out of a response to the execution of Abu Muslim by the Abbasids, and denied that he had died, rather claiming that he would return as the messiah. This message was further confirmed by the appearance of a prophet named al-Muqannaˤ "The Veiled", who claimed that the spirit of God had existed in Muhammad, Ali and Abu Muslim.
Under the leadership of Bābak, the Khurammites proclaimed the breakup and redistribution of all the great estates and the abolition of Islam. In 816 they began making attacks on Muslim forces in Iran and Iraq. The Abbasid Caliph al-Ma'mun sent four armies to deal with the problem, but they were defeated each time with Byzantine support.citation needed
The sect would continue to attract followers until the sixteenth century when the Safavids took control of Persia.[1]