Khoja or Khwaja, (Kazakh: Қожа, Uyghur: خوجا), a Persian word literally meaning 'master', was used in Central Asia as a title of the descendants of the noted Central Asian Naqshbandi Sufi teacher, Ahmad Kasani (1461–1542) or others in the Naqshbandi intellectual lineage prior to Baha al-din Naqshband. The most powerful religious figure in the late Timurid era was the Naqshbandi Shaykh Khwaja Ahrar. The Khojas often played, or aspired to play, ruling roles in the Altishahr or present day region of Tarim Basin in Xinjiang, China.
The Khojas of Altishahr claimed to be Sayyids (descendants of Mohammed) and they are still regarded as such by the fraternity people of Altishahr. Although Ahmad Kasani himself, known as Makhdūm-i-Azam or "Great Master" to his followers, never visited Altishahr (today's Tarim Basin), many of his descendants, known as Makhdūmzādas, and bearing the title Khoja (properly written and pronounced Khwaja) played important parts in the region's politics from the 17th to 19th centuries.