The Khalwati order (also known as Khalwatiyya, Khalwatiya, or Halveti, as it is known in Turkey) is an Islamic Sufi brotherhood (tariqa). Along with the Naqshbandi, Qadiri and Shadhili orders, it is among the most famous Sufi orders. The order takes its name from the Arabic word khalwa, meaning “method of withdrawal or isolation from the world for mystical purposes.”
The order was founded by Umar al-Khalwati in the city of Herat in medieval Khorasan (now located in western Afghanistan). However, it was Umar's , Yahya Shirvani, who founded the “Khalwati Way.” Yahya Shirvani wrote Wird al-Sattar, a devotional text read by the members of nearly all the branches of Khalwatiyya.
The Khalwati order is known for its strict ritual training of its dervishes and its emphasis of individualism. Particularly, the order promoted individual asceticism (zuhd) and retreat (khalwa), differentiating themselves from other orders at the time. The order is associated as one of the source schools of many other Sufi orders.
There were two major historical movements of the Khalwati order. The first one started in the late 14th century and ended in the 17th century. The first historical movement marks its origins and spread in vast area, now being part of Iran, Iraq, Syria and Turkey. The second movement began in the late 15th century to the mid-19th century mostly focused in Egypt, considered the reform period of the Khalwati order. The order lost popularity in 1865, but many of its leaders branched off to form different orders to expand Islam throughout Africa. The order resided mostly in large urban areas.
The origins of the Khalwati order are obscure, but most attribute Umar al-Khalwati as its founder, or the "first pir". However, Umar- Khalwati was considered a mysterious man who did very little to spread the order. Shaykh Yahya Shirvani was considered "the second pir" that was responsible for the spread of the Khalwati order. Yahya Shirvani lived during a time of great political instability in the wake of the Mongol invasion. After the Mongol invasions, Turkish nomads began to gather into urban centers of the Islamic world. All these cities had Sufi shaykhs performing miracles for the nomads. Thus, these Turkish nomads were easily converted to mystical Islam when the Sufi shaykhs promised them union with Allah. Yahya Shirvani entered Baku at this time of religious fervor and political instability, and he was able to start a movement. Yahya Shirvani was able to gather ten thousand people to his movement. Yahya had many popular, charismatic disciples to spread the order, including Pir Ilyas.