The Khalaj West of the Oxus
Excerpts from "The Turkish Dialect of the Khalaj", Bulletin of the School of Oriental Studies, University of London, Vol 10, No 2, pp 417-437
Muslim authors agree that the Khalaj are one of the earliest tribes to have crossed the Oxus. In addition to I. Khurdadhbih whom we have quoted above, Istakhri (circa AD 930)  says: “The Khalaj are a class of Turks who in the days of the old (fi qadim al-ayyam) came to the country stretching between India and the districts of Sijistan, behind Ghur. They are cattle breeders of Turkish appearance (khilaq), dress, and language.” Mas’udi, Muruj (AD 943), iii, 254, speaks of the Turkish tribes “Ghuz and خرلج living towards Gharsh (= Gharchistan) and Bust in (the region) adjoining Sijistan”. Contrary to Marquart, Eranshahr, 251, I think that خرلج must be read here *Kharlukh, and on the other hand, under Ghuz the author may mean the Khalaj, for, as we now know from Kashghari, the Khalaj were considered as the two “lost tribes” of the Ghuzz. 
If Istakhri and Mas’udi (?) place the Khalaj on the middle course of the Helmand, the compilator of the Hudud al-Alam (AD 982), f. 22b quotes the Khalaj in the region of Ghaznin and the adjoining districts. He speaks of their wealth in sheep and describes their habit of wandering along pasture-lands. He adds that the same tribe is numerous in “Balkh, Tukharistan, Bust and Guzganan”. In fact the name is misspelt in the MS. as خلخ and it is very possible that the author has mixed together the Khallukh خلخ and Khalaj خلج. In Tukharistan and (?) Balkh he most probably has in view the former tribe, and in Ghaznin, Bust, and Guzganan the latter.
The Saffarids were the first Muslim dynasty to penetrate into Central Afghanistan. According to Ibn al-Athir, vii, 171,  Ya’qub conquered (AD. 868) “the Khalaj, Zabul and other (lands) but I do not know the year in which it happened….”
The Ghaznavids, from the outset of their activity, had to deal with the Khalaj. Nizam al-mulk  reports an episode of Sabuktagin’s early career when he was sent by his master Alaptagin (d. 352/963) to collect taxes from “the Khalaj and Turkmans”, which he tried to do by peaceful means. In 385/995 Sabuktagin being in Herat, sent summons to the rulers of Sistan and Guzganan as well as to the *Khalaj Turks. 
Utbi, in his history (written circa 411/1020) refers to the Khalaj several times: i, 55, he announces his intention to narrate Mahmud’s victories “in India, as well as among the Turks and Khalaj”; i, 88, (Persian translation, 43, very free), he reports that after Mahmud’s expedition against India, “the Afghans and Khalaj submitted to him”; ii, 78 (Pers. Transl, 294): when Ilak Khan took up a menacing attitude Mahmud arrived in Ghazna and summoned “the Khalaj Turks, ever on their horses,  manly son of swords…” Equally, during the inroad of Qadir Khan to Tukharistan. Mahmud rushed to Balkh “with his Turkish, Indian, Khalaj, Afghan, and Ghazna troops…”
The fact that the Khalaj were associated in Mahmud’s victories may account for their subsequent ambitions, Already under the weak Sultan Mas’ud, they became restive. On 19 Muharram 432/1040, Mas’ud had to send an expedition from Ghazni in order to obtain the submission or punishment of the Khalaj who, during his absence, had committed some transgressions (fisad), Abul Fazal Bayhaqi, ed. Morley, 826, 830 [where خلج is mis-spelt as بلخ]
Najib Bakrans geography Jahan-nama, written (circa AD, 1200-1220) on the eve of the Mongol invasion, contains a particularly interesting paragraph on the changes which the originally Turkish tribe was undergoing: “The Khalaj are a tribe of Turks who from the Khallukh limits migrated to Zabulistan. Among the districts of Ghazni there is a steppe where they reside. Then, on account of the heat of the air, their complexion has changed and tended towards blackness; the tongue (zuban) too has undergone alterations and become a different language (lughat).”
In the earliest mention of Juvaynis Jahan-Gusha, i, 132, “the Khalaj of Ghazni” are curiously associated with “Afghans”; a levy (hashar) of these two tribes mobilized by the Mongols took part in the punitive expedition to the region of Merv, ii 194-8: after the disruption of the kingdom of Sultan Muhammad Khwarazim Shah, a “numberless” mass of “Khalaj and Turkmans from Khorasan and Transoxiana” gathered at Purshavur (Peshawar) under the leadership of Saif al-Din Ighraq (var. *Yighraq)  – Malik, who according to a gloss was himself a Khalaj. This army defeated the petty king of Ghazna, Radhi al-Mulk, but when Jalaladin Khwarazim Shah arrived in Ghazna, Ighraq came to greet him. After Jalaladin defeated the Mongols at Parvan, the Khalaj, Turkmans, and Ghauris of his army quarrelled with the Khwarazimians over the booty and finally retreated towards the south. Ighraq returned to Peshawar while his rival Nuh-Jandar stayed at *Ningrahar, but Ighraq retraced his steps and killed him. Finally, Mongol detachments reached the spot and destroyed the whole of the 20,000 - 30,000 Khalaj, Turkmans, and Ghauris who had abandoned Jalaladin. 
This historical sketch very clearly shows the gradual expansion of the southern branch of the Khalaj from the lower course of the Helmand to the environs of Ghazna and later to the neighborhood of Peshawar; on the other hand, it indicates how the Khalaj were utilized by the lords of the time and how gradually they found their way to power.
India was ever a most welcome field for energetic adventurers, and as early as AD. 1197 Muhammad Bakhtiyar Khalji , acting on behalf of the Ghurid Muiz al-Din Muhammad occupied Bihar and AD. 1202, at the head of a small troop of horse, conquered Lakhnauti in Bengal of which he became the governor.
In 689/1290 Jalal al-din Firuz Khalji succeeded the Mamluk kings on the throne of Delhi and his short-lived dynasty lasted till 1320. 
Another Khalji dynasty, descended from a brother of Firuz, ruled in Central India (Malwa) AD. 1436-1531. Equally the Lodhi kings of Delhi (AD. 1451-1526) belonged to a Khalji family which was established in Multan already towards AD 1005.
The Khalji in India were considered as Afghans and perhaps in the fifteenth century possessed no knowledge of Turkish but we must remember what Najib Bakran says on the changes undergone by the Khalaj of Afghanistan. In Afghanistan and India the descendants of the Khalaj are called Ghal-zae, i.e. “sons of the thief”.  This later popular etymology and the legend built up round it are certainly artificial. The fact is that the important Ghilzai tribe occupies now the region round Ghazni,  where the Khalaj used to live and that historical data all point, to the transformation of the Turkish Khalaj into Afghan Ghilzai. Even the phonetic evolution of the name has nothing astonishing. The ancient Turkish form was Qalaj (or Qalach), and it is well known that Turkish q was heard by the Arabs now as kh and now as gh.  Qalaj could have a parallel form *Ghalaj of which it was easv to bring the end in conformity with the usual Afghan terminology of zae, zai (= Persian –zada).
 In the account of the province of Davar on the Hilmand.
 After all Mas’udis vague passage may even not refer to the Khalaj but only to the Kharlukh and the Turkmans (often quoted alongside with the Khalaj).
 Probably based on the history of Ibn al-Azhar al-Akhbari, see Barthold, Zur Geschichte der Saffariden, in Oriental Studien Th. Noldek, 1906, pp 173, 186.
 Siasat Nama (485/1092), ch. xxvii, p. 96
 Gardizi, 56. The text has Turkan-e Sulh but the editor has already suggested the reading *Khallukh. I admit the necessity of the emendation, but, in view of the circumstances, I prefer *Khalaj.
 Ahlas al-Zuhr
 The alternance of initial i- and yi is frequent; cf. Inal/Yinal
 But certainly not at all the Khalaj.
 i.e. Khalaji. In Indian pronunciation the middle short vowel of a tri-syllabic word regularly omitted (shafaqat > shafqat), shafaqal > while a mono-syllabic word ending in two consonants becomes bi-sylabic (fahm > faham).
 His father had the Turkish title Yughrush, see M. F. Koprulu, Zur Kentniss der altturkischen Titulatur, in Korosi Csoma Archivum, 1938, Erganzungsband, p. 339, who quotes Tarikh-e Farishta, I, 152, 155.
 Or with a further reduction of the vowel: Ghilzae, in Persian Ghiljai
[12 See Longworth Dames, Afghanistan and Ghilzai in EI. The author seems not to have realized the weight of the earlier historical evidence and disbelieved the possibility of the transformation Khalaj > Ghilzai, fully admitted by other collaborators of the EI. (Barthold, Sir W. Haig); cf. laso Marquart, op. cit., 253. In fact there is absolutely nothing astonishing in a tribe of nomad habits changing its language. This happened with the Mongols settled among Turks and probably with some Turks living among Kurds. [Sir W. Haig in the Cambridge History of India, III, 90, gives a pertinent reply to Raverty: “If the Ghilzay be not Khaljis it is difficult to say what has become of the latter.”]
 Cf. Tabari, iii, 1416: Ghamish < Turkish Qamish “a reed”.