The Khalji or Khilji (Persian: ) dynasty was the second dynasty which ruled the Delhi sultanate, covering large parts of the Indian subcontinent for nearly three decades between 1290 and 1320. It was founded by Jalal ud din Firuz Khalji.
The Khalji dynasty was of Turko-Afghan origin whose ancestors, the Khalaj, are said to have been initially a Turkic people who migrated together with the Hunas and Hephthalites from Central Asia, into the southern and eastern regions of modern-day Afghanistan as early as 660 CE, where they ruled the region of Kabul as the Buddhist Turk Shahis. According to R.S. Chaurasia, the Khaljis slowly inherited many Afghan habits and customs, and that they were treated as Afghans by the Turkic nobles of the Delhi Sultanate. Even to the point where Turkic nobles in the Delhi Sultanate opposed Jalal-ud-din's acension to the throne of Delhi after the Khilji revolution.
André Wink however, states that Khaljis were a Turkicized group and remnants of early Indo-European nomads such as Kushans, Hephthalites, and Sakas who later merged with the Afghans. Also, stating that "at that time they were not perceived as Turks or Mongols. Contemporary historians clearly distinguish the Khaljis from the Turks"
According to C. E. Bosworth, the Ghilzai, who make up the majority of the Pashtuns in Afghanistan, are the modern result of the Khalaj assimilation into the Pashtuns. Between the 10th and 13th centuries, some sources refer to the Khalaj people as of Turkic, but some others do not. Minorsky argues that the early history of the Khalaj tribe is obscure and adds that the identity of the name Khalaj is still to be proved. Mahmud al-Kashgari (11th century) does not include the Khalaj among the Oghuz Turkic tribes, but includes them among the Oghuz-Turkman (where Turkman meant "Like the Turks") tribes. Kashgari felt the Khalaj did not belong to the original stock of Turkish tribes but had associated with them and therefore, in language and dress, often appeared "like Turks".