Coming back to our main discussion on the evolution of Sufi institutions, sometime after the establishment of ribats, the khanqah as a new and most recognizable Sufi religious and educational institution started to emerge. Although ribats and to a lesser extent duwayrahs were still there, the emergence of khanqahs eclipsed them all. This was so because the emergence of khanqahs both coincided and was spurred by a favorable socio-political climate — as we will see later. This was so, furthermore, because the evolution of Sufi institutions from mosques and duwayrahs to ribats and khanqahs followed some logic and was rather spontaneous. Ribats and to a smaller degree duwayrahs were mere shelters for the Sufis where they resided and where some basic and perhaps ad hoc worship, ascetic and learning activities were conducted. As al-Maqrizi remarked: “Every community has its home (dwelling). The home (dwelling) of the Sufi community is the ribat.” The same idiom has been ascribed to Shihab al-Din Umar al-Suhrawardi as well. Khanqahs, on the other hand, signified Sufi complexes where the Sufis still resided but their worship, ascetic, socialization and learning activities became more sophisticated and elaborate. They were getting closer to grouping themselves into orders and fraternities (tariqah) and that necessitated some additional logistic, management, organizational and functional support and rethinking. Thus, in some places ribats simply merged with khanqahs, while in other places they both existed separately, often next to each other, serving in their different capacities the growing interests of Sufism and the Sufi fraternity. When existing together, it seems as though khanqahs functioned as worshipping, learning and socializing centers, whereas ribats functioned mainly as hostels. As an illustration, while describing the Khanqah of a Mamluki Sultan Ruknuddin Baybars al-Jashankir (d. 709 AH/ 1309 CE) in Cairo, which was the most splendid khanqah in Cairo, al-Maqrizi wrote that next to it, the Sultan built a massive ribat to which one could go from inside the khanqah. Ibn Jubayr also spoke of both ribats and khanqahs as separate institutions in Damascus. But at one point he commented that ribats were called khanqahs and were numerous in Damascus. Surely, those accounts only buttress our reflection that the two institutions sometimes merged and were called khanqahs, sometimes, rarely though, stood and operated separately, and yet at other times were integrated into a Sufi complex while retaining their respective identities. In the last scenario, ribats normally played a supplementary role to khanqahs.
It follows that subsequent to the full institutionalization of khanqahs, it was a rarity that an entire Sufi complex was still called just a ribat. Only smaller, some perhaps private, Sufi lodges with less convoluted and methodical ascetic and educational procedures and curricula in certain regions were still thus called, like the one in which Abu Hamid al-Ghazzali retired and taught Sufism after his first stint as a Nizamiya school professor and after completing his magnum opus “Ihya’ ‘Ulum al-Din” following a substantial period of withdrawal and isolation. This Abu Hamid al-Ghazzali’s Sufi lodge Abu al-Fida’ Ibn Kathir called a ribat, adding that large multitudes of people on a daily basis thronged to it in order to listen to Abu Hamid al-Ghazzali. As mentioned earlier, after his conversion to Sufism, Abu Hamid al-Ghazzali taught in a government sponsored school too, apart from teaching in his relatively small ribat. According to Abu al-Fida’ Ibn Kathir, some of the earliest Saljuqi Sufi institutions which the Saljuqi rulers constructed and donated to the Sufis, were also termed as ribats. At any rate, interchangeable uses of the terms ribat and khanqah were not consistent. The matter varied from one region to another depending on how profoundly the Sufism and Sufi institutions phenomena took root and how widely they were represented in those regions.
Just like ribats, it is likewise possible that after the emergence of khanqah systems, whatever survived of the notion of duwayrah, the prototype Sufi institution, the same either fully integrated itself into the former, or functioned in part independently but still as a supportive component or an annex in khanqahs and their complexes. It is owing to this that Siraj al-Din ‘Umar al-Misri Ibn al-Mulaqqan (d. 804 AH/ 1401 CE) mentioned in his book on the categories of the Sufis, or the friends of Allah, “Tabaqat al-Awliya’”, that Muhammad b. al-Husayn al-Naysaburi, a Sufi master from Nishapur who died in 412 AH/ 1021 CE, bequeathed a duwayrah in his hometown to his followers. However, it appears as though that was not just a duwayrah in a classical sense of the word. It was more than that. It might have been part of a larger Sufi multiplex, as the author revealed that the grave of the mentioned Sufi master was patronized for the sake of seeking blessings. The grave should not have been far away from the duwayrah, nor should it have stood alone and bare, taking into account some Sufi, as well as ordinary people’s, beliefs and customs as regards venerating the graves of certain sheikhs and saints which were firmly established at the time of the aforementioned author. In addition, the first and one of the most prominent and influential khanqahs in Egypt, which was established by Salahuddin al-Ayyubi (d. 590 AH/ 1193 CE) after his dethroning of the Shi’ah Fatimids and whose official name was al-Khanqah al-Salahiyyah, was also called a Sufi Duwayrah.
The term khanqah is made up of two Persian words “khana–gah” and means “a place of residence” for the Sufis, or “place of the table”, or “place of recitation”. This word is found to be used in the Persian regions and also in the Arab regions such as Syria, Iraq and Egypt, i.e., in the regions once ruled and dominated by the Saljuqs (5th-7th AH/ 11th-13th CE century) and its associated rulers, the Ayyubids ( 6th-8th AH/ 12th-14th CE century). A typical khanqah was a self-reliant hostel, a meeting and socialization place, a madrasah or school, and to some extent, a mosque, with all the necessary annexes, services, amenities and facilities. A majority of khanqahs were sponsored by governments, especially in Saljuqi, Ayyubid, Mamluki and Ottoman states. Some khanqahs’ major benefactors were rich individuals. Others were financially backed simply by pious donations of the public. The earliest reference to a khanqah is given in relation to a Sufi named Abu Turab ‘Askar al-Nakhshabi who died in 245 AH/ 859 CE. He is reported to have said once to his companions: “He who wears patched rags, is begging (for alms); he who sits in the khanqah or in the mosque, is begging; and he who reads aloud the Qur’anic text from the book for people to hear is also a beggar.” As another example of early khanqahs during the early 4th AH/ 10th CE century, it is reported about a Sufi Ali b. Ahmad al-Bushanji (d. 348 AH/ 959 CE) that he built in Nishapur a khanqah, frequented and stayed in mosques, and observed seclusion.
There are a few other 4th AH/ 10th CE century references to the existence of khanqahs, such as the one given by Ibn al-Nadim (d. 388 AH/ 998 CE) in his book “al-Fihrist”, the other one by an anonymous author in a book called “Hudud al-‘Alam” written in Guzgan in 372 AH/ 982 CE, and yet another one provided by al-Maqdisi (d. 380 AH/ 990 CE). Al-Maqdisi’s account serves as evidence that khanqahs were an exclusive institution of the then Karramiyyah, a group of generally pseudo and heterodox Sufis who flourished in Khurasan, Samarqand, Jurjan and Transoxania as well as Jerusalem. Regarding the khanqahs of the Karramiyyah, Alexander Knysh believes that towards the end of the 4th AH/ early 11th CE, and the early 5th AH/ 11th CE centuries, they were scattered across the Persian countryside serving as centers of instruction and ascetic life. Those khanqahs, furthermore, might have been the prototypes of the subsequent Sufi lodges which mushroomed in the eastern parts of the Muslim world from the 6th AH/ 12th CE century onward. To digress a bit, the Karramiyyah were a religious movement that combined theological beliefs and Sufi practices. They proselytized the common people and converted them to Islam. They seem to have been the first to raise the initial Sufi elements of collective organization into a full-scale movement. They developed a system of khanqahs that served as bases for missionary activities. “This organized religious mission had widespread success among the common people but was bitterly opposed by the Muslim schools of law, other Sufis, and eventually by the Saljuq state authorities.”
In the 5th and 6th AH/ 11th and 12th CE centuries the khanqah institution was in its heyday. That was so, firstly, because in the 5th AH/ 11th CE century the proliferation of khanqahs denoted a natural current phase in the centuries-old evolution of Sufism and its institutions, and secondly, because of the numerous but for Sufism advantageous social, political and intellectual developments and changes that were sweeping across the Muslim lands and which proved to be pivotal for the subsequent history of Sufism. That was a time when Sufism as a massive movement was spreading from its foremost urban nucleuses in Iraq, Khurasan, Transoxania and, to some extent, Syria. Some of the major urban centers of Sufism were Baghdad, Basrah and Nishapur. It seems as though there was no Muslim territory then where Sufism did not start spreading its wings and was not on the rise, in some places more and in other places less. Most of the prominent Sufis of the time were closely connected, keeping in touch with one another through travel and written correspondence. Besides, they were further interrelated and united by the fact that they learned from and shared the same intellectual and spiritual legacies of several former Sufi masters, such as al-Junayd al-Baghdadi, Sahl al-Tustari and Abu Yazid al-Bistami, to name but a few. Certainly, al-Junayd al-Baghdadi with his teachings and enormous number of disciples surpassed every other Sufi master of his epoch. So towering was his personality, and so colossal was his influence in the sphere of Sufism, that he is rightly labeled as the master (sayyid) of the Sufi community and their imam or leader. As a result of those developments, creating khanqah centers which functioned as multi-purpose gathering places many of which included areas reserved for prayer, religious schools, and residential quarters for students, guests, pilgrims and travelers, was stepped up. Later, some of those khanqah centers even included the shrines of certain Sufi masters and saints. Hence, most of the leading Sufi figures of the 5th AH/ 11th CE century are said to have had connections with one or more khanqahs. Some of those Sufi personalities were Abu Ali al-Daqqaq, Abu Abd al-Rahman al-Sulami (d. 412 AH/ 1021 CE), Abu Sa’id b. Abi al-Khayr (d. 440 AH/ 1049 CE), al-Hujwiri (d. 463 AH/ 1071 CE), Abu al-Qasim al-Qushayri, and many others.
Furthermore, the khanqah institution during the mentioned timeframe was in its heyday also because from the 6th AH/ 12th CE century onward, the Sufi life was increasingly cultivated in the Sufi associations or orders (tariqah, pl. turuq), many of which are still active today. In fact, if today Islamic Sufism is mentioned, the Sufi orders, their specialized institution and particular customs and rituals are the first things that come to mind. That was a time, in addition, when the grand masters of tariqah Sufism lived, such as Abdul Qadir al-Jilani (d. 561 AH/ 1166 CE), the founding father of the Qadiriyah Sufi order which with its various branches represents arguably the most recognized tariqah, Abu al-Najib Abd al-Qahir al-Suhrawardi (d. 563 AH/ 1168 CE) with whom the emergence of the Suhrawardiya brotherhood is associated, Shihab al-Din Umar al-Suhrawardi (d. 632 AH/ 1234 CE) who was Abu al-Najib Abd al-Qahir al-Suhrawardi’s nephew and who wrote a famous book on institutionalized Sufism “‘Awarif al-Ma’arif”. It should also be noted that Abu al-Najib Abd al-Qahir al-Suhrawardi was a disciple of Ahmad al-Ghazzali (d. 520 AH / 1126 CE), brother of the celebrated Abu Hamid al-Ghazzali. Furthermore, in the Muslim West, the fortunes of Sufism were inextricably tied with the personality and teachings of Abu al-Hasan Ali al-Shadhili (d. 656 AH/ 1258 CE). “This Maghribi Sufi launched a tariqah which gave birth to numerous dynamic ramifications in Egypt and North Africa. Later on, the offshoots of the al-Shadhiliya tariqah spread throughout the Islamic world, as far as India and Indonesia.” To this plethora of Sufi masters we must also add Bahauddin Muhammad b. Muhammad Naqshband (d. 791 AH/ 1389 CE), a Sufi master and the founder of the Naqshbandiya Sufi order which thrived in Turkey, Transoxania, Khurasan and India, Najm al-Din Kubra (d. 617 AH/ 1220 CE) and the Kubrawiya Sufi order, as well as Shah Ni’mat Allah Wali (d. 834 AH/ 1430 CE) and the Ni’matullahi Sufi order. Lastly, this exclusive guild of most distinguished Sufi masters who contributed most to the shaping and modeling of the Sufi community’s future paths, would not be complete if such personalities as Ahmad al-Rifa’i (d. 583 AH/ 1187 CE) and Jalaluddin Muhammad al-Rumi (d. 672 AH/ 1273 CE) are not mentioned. The former was the founder of Rifa’iyyah, a Sufi fraternity found primarily in Egypt and Syria and in Turkey until outlawed in 1925. The Rifa’iyyah tariqah was an offshoot of the Qadiriyah Sufi order established in Basra, Iraq. Jalaluddin Muhammad al-Rumi, on the other hand, was the founder of Mawlawiyah Sufi fraternity in Konya, Anatolia. He was a well-known Persian Sufi poet whose popular title mawlana (Arabic: “our master”) gave the order its name. The order, propagated throughout Anatolia, controlled Konya and environs by the 9th AH/15th CE century and in the 11th AH/ 17th CE century appeared in Constantinople (Istanbul). European travelers identified the Mawlawiyah as dancing (or whirling) dervishes, based on their observations of the order’s ritual prayer (dhikr), performed spinning on the right foot to the accompaniment of musical instruments.
Although mosques and madrasahs were never abandoned, the existence of large and more durable khanqahs was inevitable, becoming a regular and prominent feature of Islamic urbanism especially from the 5th AH/ 11th CE century onward. In them, Sufi masters taught, trained and guided the ever swelling circles of disciples that used to surround them in official sessions. Other social and spiritual markers were concomitantly established, eventually making them permanent Sufi customs and traditions, such as wearing specially designed Sufi dress and paraphernalia, communal rituals such as the dhikr (remembering God) performed in assembly, and formulaic prescriptions for spiritual exercises issued by authoritative masters who normally resided fulltime in khanqahs. Wide-ranging systems of educational and spiritual exercises and modi operandi were developed. Under these circumstances, the legacy of a Sufi master was preserved in works that were either his own dictations to disciples who acted as his scribes or later compilations of notes recorded by disciples during his teaching sessions.
Evidently, the rise of the tariqahs went through several important phases, and with it the rise of Sufi institutions especially khanqahs, because it is the concept of khanqah that is most identifiable with the concept of tariqah. At first, the embryonic Sufi orders were housed in austere Sufi lodges and hermitages wherein the Sufis practiced their rites and engaged in collective and individual worship without being disturbed by the hustle and bustle of everyday life. Gradually, these institutions acquired rigidly fixed rules of fellowship and a complex hierarchical leadership. The teacher-disciple relation was a relatively loose one. The disciple (murid) often attached himself to several teachers in the hope of benefitting from their spiritual advice and from their varying interpretations of the knowledge pertaining to the Sufi path. But this relationship was set to undergo an important change from the end of the 4th AH/ 10th century. As were Sufi institutions and establishments, which functioned as a physical locus of the Sufi life, set to gradually change and become rather multifunctional multiplexes as a result. Alexander Knysh explained the changes in the Sufi practice: “The face-to-face instruction in a casual setting that was typical of early Sufism was replaced by a more-or-less formal course that the spiritual master offered simultaneously to a relatively large group of disciples. In some cases, the teacher supported his disciples from his own funds or by means of pious donations. In return, he came to require of his disciples undivided loyalty and could even prohibit them from attending the teaching sessions of other Sufi masters. The training technique of an individual teacher came to be known as his spiritual ‘way’ or ‘method’ (tariqah). It was, in essence, a set of rules, rituals and pious formulas, which the sheikh imposed upon his disciples… As time went on, the term tariqah came to be applied metonymically to the Sufi discipline and doctrine pursued by the followers of a Sufi master within the framework of a Sufi institution… (Sufi orders or tariqahs) were usually named after their founders, although the credit for the shaping of the disciples of a given sheikh into a structured social and religious organism usually went to his immediate successors…Upon completing his training under a renowned master, the novice obtained from his teacher a license to instruct his own disciples (ijazah).”
Finally, following its emergence and rapid spread throughout the Muslim world, linguistically the khanqah institution was not called as such in every Muslim region, even though most people must have been familiar with it. The name khanqah might have not been so widespread in some provinces of the Muslim West, especially the North Africa, where the name for similar Sufi institutions was zawiyah instead, and in some Turkish regions under the Ottomans where the adopted name was tekke. On visiting Cairo in 727 AH/ 1326 CE, Ibn Battuta (d. 771 AH/ 1369 CE), who was from Morocco, remarked that there were in the city many Sufi institutions and establishments. He called them zawiyahs but commented that the people of Cairo called them khanqahs. He also said that the nobles vied with one another in building them. Generous endowments were provided too. Each of the khanqahs functioned like an educational institution. In each of them, there were Sufi personnel, mostly Persians, who were men of good education and were adepts in the Sufi doctrines. During Ibn Battuta’s visit, Cairo was ruled by the Mamluks who were known as avid supporters and benefactors of Sufism and Sufi institutions.
How rapidly institutionalized Sufism was spreading, and how ubiquitous it became in almost every phase of the Islamic cultural and civilizational presence in most of the geographical centers of Islam, bears witness a fact that in 1256 AH/ 1840 CE there were some thirty-seven active tariqahs in Ottoman Istanbul alone, nineteen or twenty of which had an institutional presence. These tariqahs were represented by approximately three hundred tekkes or khanqahs, distributed across the city and its adjacent villages. Istanbul’s population at that time was around three-quarters of a million, ethnically and racially mixed; the greater number were Muslims and of these most were likely affiliated with tekkes, either as dervishes or sympathizers. Around the same time, it is said that there were some two thousand to three thousand tekkes in the provinces of Anatolia and Rumelia, which together formed the nucleus of the Ottoman empire. As late as 1287 AH / 1870 CE registered resident dervishes or Sufis constituted 1 percent of the male Muslim population of Istanbul. What is more, according to some estimates, on the eve of World War I there were about sixty thousand nonresident Sufi disciples or sympathizers in Istanbul, “which means that one in four of the city’s male Muslim inhabitants was associated with a tekke.”
 Abu al-‘Abbas al-Maqrizi, Al-Khitat al-Maqriziyyah, vol. 4 p. 302.
 Shihab al-Din Umar al-Suhrawardi, ‘Awarif al-Ma’arif, vol. 1 p. 267.
 Abu al-‘Abbas al-Maqrizi, Al-Khitat al-Maqriziyyah, vol. 4 p. 285.
 Ibn Jubayr, Rihlah Ibn Jubayr, (Beirut: Dar wa Maktabah al-Hilal, 1981), p. 231.
 Th. Emil Homerin, Sufis and Their Detractors in Mamluk Egypt, A Survey of Protagonists and Institutional Settings, in “Islamic Mysticism Contested”, edited by Frederick De Jong and Bernd Radtke, p. 225-247.
 Abu al-Fida’ Ibn Kathir, al-Bidayah wa al-Nihayah, vol. 12 p. 159.
 Ibid., vol 12 p. 133.
 Siraj al-Din ‘Umar al-Misri Ibn al-Mulaqqan, Tabaqat al-Awliya’, p. 234.
 Abu al-‘Abbas al-Maqrizi, Al-Khitat al-Maqriziyyah, vol. 4 p. 282.
 Abu al-Qasim al-Qushayri, Al-Risalah al-Qushayriyyah, translated into English by Alexander Knysh, p. 40. Siraj al-Din ‘Umar al-Misri Ibn al-Mulaqqan, Tabaqat al-Awliya’, p. 254. Christopher Melchert, The Transition from Asceticism to Mysticism at the Middle of the Ninth Century CE, Studia Islamica, 1996/1 (fevrier) 83, p. 51-70 (http://www.scribd.com/doc/46771809/Transition-From-Ascetism-to-Mysticism accessed October 13, 2012 )
 Siraj al-Din ‘Umar al-Misri Ibn al-Mulaqqan, Tabaqat al-Awliya’, p. 196.
 Abu Mansur al-Baghdadi, Al-Farq bayn al-Firaq, p. 130-138. Muhammad b. Abd al-Karim Shahrastani, al-Milal wa al-Nihal, (Beirut: Dar al-Ma’rifah, 1998), p. 124.
 Wan Noor Zeiti Binti Wan Abdul Rashid, Khanqah, A Sufi Learning Institution in Mamluk Egypt (1250-1517 C.E.), p. 26. Yasser Tabbaa, The Transformation of Islamic Art during Sunni Revival, (Seattle: University of Washington Press, 2001), p. 15.
 Alexander Knysh, Islamic Mysticism, A Short History, p. 90. See also: Wilferd Madelung, Sufism and the Karramiyya, in “Sufism”, edited by Lloyd Ridgeon, (London: Routledge, 2008), vol. 1 p. 131-144.
 Ira M. Lapidus, Sufism and Ottoman Islamic Society, in “The Dervish Lodge”, edited by Raymond Lifchez, p. 25.
 Ibid., p. 25.
 Ahmet T. Karamustafa, Sufism, the Formative Period, p. 59.
 Ahmad Ibn Taymiyah, Majmu’ah al-Fatawa, vol. 6 p. 132. Abu al-Qasim al-Qushayri, Al-Risalah al-Qushayriyyah, p. 430. Siraj al-Din ‘Umar al-Misri Ibn al-Mulaqqan, Tabaqat al-Awliya’, p. 110.
 Wan Noor Zeiti Binti Wan Abdul Rashid, Khanqah, A Sufi Learning Institution in Mamluk Egypt (1250-1517 C.E.), p. 28. Margaret Malamud, Sufi Organizations and Structures of Authority in Medieval Nishapur, in “Sufism”, vol. 1 p. 212-230. J. Spencer Trimingham, The Sufi Orders in Islam, (Oxford: The Clarendon Press, 1971), p. 1-30.
 Seyyed Hossein Nasr, The Spiritual Significance of the Rise and Growth of the Sufi Orders, in “Islamic Spirituality, Manifestations”, (London: SCM Press Ltd, 1991), p. 3-5.
 Alexander Knysh, Islamic Mysticism, A Short History, p. 207.
 Mawlawiyah, Encyclopedia Britannica Academic Edition, http://www.britannica.com/EBchecked/topic/370328/Mawlawiyah (accessed November 10, 2012)
 Ahmet T. Karamustafa, Sufism, the Formative Period, p. 121. J. Spencer Trimingham, The Sufi Orders in Islam, p. 166-216.
 Alexander Knysh, Islamic Mysticism, A Short History, p. 172. Carl Ernst and Bruce Lawrence, What is a Sufi Order?, in “Sufism”, edited by Lloyd Ridgeon, (London: Routledge, 2008), vol. 1 p. 231-249. J. Spencer Trimingham, The Sufi Orders in Islam, p. 166-216.
 Alexander Knysh, Islamic Mysticism, A Short History, p. 172-173.
 H.A.R. Gibb & J.H. Kramers, Concise Encyclopedia of Islam, (Leiden: Brill Academic Publishers, 2001), p. 657.
 Ibn Battuta, Travels in Asia and Africa, translated and selected by H. A. R. Gibb, (London: Darf Publishers Ltd, 1983), p. 51.
 The Dervish Lodge, edited by Raymond Lifchez (See “Introduction” by Raymond Lifchez), p. 5.
 Klaus Kreiser, The Dervish Living, in “The Dervish Lodge”, edited by Raymond Lifchez, p. 49.