In the Middle Ages the Kingdom of Ghur included the Herat valley as far as Khwaja Chist above Obeh in the valley of the Hari Rud, as well as all the hill country to the south-east. About the earliest mention of Ghur by any traveller is that of Ibn Haukel, who speaks of Jebel al Ghur, and talks of plains, ring-fenced with mountains, fruitful in cattle and crops, and inhabited by infidels (_i.e._ non-Mussulmans). The later history of Ghur is inextricably intertwined with that of Ghazni.
Mahmud of Ghazni frequently invaded the hills of Ghur which lay to the west of him, but never made any practical impression on the Ghuri tribespeople. In 1020, however, Mahomedans conquered Ghur effectually from Herat. About a century later (this is after the time of Idrisi, whose records we are following) a member of the ruling Ghuri family (Shansabi) was recognized as lord of Ghur, and it was one of his sons (Alauddin) who inflicted such terrible reprisals on Ghazni when he sacked and destroyed that city and its people. It was about this time (according to some authorities) that the kingdom of Bamian was founded by another member of the same family; but we find Bamian distinctly recognized as a separate kingdom by Idrisi a century or so earlier. From 1174 to 1214 Bamian was the seat of government of a branch of this family ruling all Tokharistan (Turkistan), during which period Seistan and Herat were certainly tributary to Ghur. Ghur then became so powerful, that it was said that prayers in the name of the Ghuri were read from uttermost India to Persia, and from the Oxus to Hormuz.
In 1214 Ghur was reduced first by Mahomedans from Khwarezm (Khiva), and shortly afterwards by Chenghis Khan and his Mongol hosts. About the middle of the thirteenth century, however, a recrudescence of power appeared under the Kurt (or Tajik) dynasty subject to the supreme government of the Mongols. Seistan, Kabul, and Tirah were then ruled from Herat as the capital of Ghur. Timur finally broke up Herat and Ghur in 1383, since which time its history has been as obscure as the geography of the region which surrounded it. Such in brief is the stormy tale of Ghur, and it leads to one or two interesting deductions. There was evidently constant and ready communication with Herat, Bamian, and Ghazni. The capital of Ghur must have been an important town, situated in a fertile and fairly populous district, which, although it was mountainous, yet enjoyed an excellent climate. It must have been a military centre too, with fortresses and places of defence. During its later history it is clear that Ghur was often governed from Herat, but in earlier mediæval days Ghur possessed a distinct capital and a separate entity amongst Afghan kingdoms, and was able to hold its own against even so powerful an adversary as Mahmud of Ghazni, whilst its communications were with Bamian on the north-east rather than with Kabul, which was then regarded as an "Indian" city. We can at any rate trace no record of a direct route between Ghur and Kabul.