The term dār al-hijra (Arabic: دار الهجرة||place of exile/refuge/migration) was originally applied to Medina, the city where Muhammad an his followers sought refuge when exiled from Mecca in 622 (Hijrah). The term was accordingly later adopted by radical Islamic sects, most notably the Isma'ilis, for their strongholds, which were to serve both as bases of operations and as nuclei of 'true' Islamic communities.
The exile, or migration, of Muhammad and his followers in September 622 from Mecca to Medina was a seminal event in the history of Islam. This event was named, originally meaning "the breaking of the ties of kinship or association", and those Meccan supporters who followed Muhammad into exile—as well as those who had earlier gone into exile in Abyssinia—became known as the, a title that acquired enormous prestige in later years. In the Quran, the is considered as an obligation of all Muslims, notably in the injunction that all Muslims residing in the lands of non-believers (the) and thus unable to practice their religion freely and be liable to commit wrong-doing, should migrate to Islamic lands; else they are to be condemned to hell.
As a result, in early Islam, following the rapid Muslim conquests, the new garrison towns where the Arab Muslims settled were often referred to as the "places of migration" . This use did not last long, however. As the historian Alan Verskin remarks, "hijra was a useful concept for a minority community with limited political power that was in the process of establishing itself", while the Muslims held political power and quickly became the dominant group in the lands they had conquered. Consequently, while most Sunni jurists came to accept that the Quranic injunction only applied to the Meccans of Muhammad's time, and consider it to have been abrogated thereafter, the term was in turn "seized upon by minority Islamic opposition groups [...] who sought divine justification for their actions", such as the Kharijites and Zaydi Shi'a. Thus, in the 680s, during the civil war of the Second Fitna, the Kharijite leader Nafi ibn al-Azraq, "held that only those who actively supported him were genuinely Muslims, and spoke of them as, who made the to his camp, which was " (W. Montgomery Watt).
In the 9th century, the great Zaidi imam and theologian al-Qasim al-Rassi (785–860) considered the Muslim rulers of his time as illegitimate tyrants, and the lands they ruled as "abode of injustice" . Consequently, according to al-Rassi, it was the duty of every faithful Muslim to emigrate. In the words of the historian Wilferd Madelung, "The Quranic duty of hijra, imposed initially on the faithful in order that they should dissociate from the polytheists, was permanent and now applied to their dissociation from the unjust and oppressors".
The first Isma'ili was established in 885 by the missionary Ibn Hawshab in Yemen, at the fortress of Bayt Rayb in the Maswar mountains near Sana'a, as a centre of operations for the Isma'ili missionary activity . The historian Heinz Halm described this event thus:
The analogy was furthered by giving the name of to those who abandoned their homes to join Ibn Hawshab in the . Likewise, those followers who remained behind were referred by the term "helpers", originally given to the Medinans who were converted to Islam by Muhammad. This model was soon emulated in Iraq, where the first Isma'ili was founded in 890 or 892, at the village of Mahtamabad in the of Kufa, and shortly after by the Abu Abdallah al-Shi'i in Ifriqiya, who established his at Tazrut, and by the Abu Sa'id al-Jannabi at al-Ahsa in Bahrayn. Likewise, during the period when Multan was the seat of a pro-Fatimid Isma'ili principality, Multan was the de facto for the local Isma'ilis.
The concept continued to be used by the Isma'ili, especially in Persia, where in the 11th century the various Isma'ili cells succeeded in acquiring control over several mountain fortresses (see list) by exploiting the rivalries of the local Seljuq commanders. After the Persian Isma'ilis broke away from the Fatimid Caliphate as a result of the Nizari–Musta'li schism of 1095, these scattered fortresses formed the nucleus of an independent Nizari Isma'ili state and its Order of Assassins.