The Kabul Shahi dynasties also called Shahiya ruled the Kabul Valley (in eastern Afghanistan) and the old province of Gandhara (northern Pakistan) during the Classical Period of India from the decline of the Kushan Empire in the 3rd century to the early 11th century. They are split into two eras: the Buddhist Turk Shahi and the later Hindu-Shahis with the change-over occurring around 870 CE.
When Xuanzang visited the region early in the 7th century, the Kabul region was ruled by a Kshatriya king, who is identified as the Shahi Khingal, and whose name has been found in an inscription found in Gardez.
These Hindu kings of Kabul and Gandhara may have had links to some ruling families in neighboring Kashmir, Punjab and other areas to the east. The Shahis were rulers of predominantly Buddhist and Hindu populations and were thus patrons of numerous faiths, and various artifacts and coins from their rule have been found that display their multicultural domain.Kabul shahi opposes the ummiyad attacks until 7th century .At the end period the last Shahi emperors Jayapala, Anandapala and Tirlochanpala fought the Muslim Turk Ghaznavids of Ghazna and were gradually defeated. Their remaining army were eventually exiled into northern India.
Xuanzang describes the ruler of Kapisa/Kabul, whom he had personally met, as a devout Buddhist and a Kshatriya. The 11th-century Persian Muslim scholar Alberuni recorded folklore concerning the early history of the Kabul Shahi rulers, including beliefs that:
Thus the folklore accounts recorded by Alberuni connect the earlier Shahis of Kabul/Kapisa to Turkish extraction and also claim their descent from Kanik (or Kanishaka of Kushana lineage). At the same time it is also claimed that 'their first king Barahatigin (Vrahitigin?) had originally come from Tibet and concealed in a narrow cave in Kabul area (and here is given a strange legend which we omit).' One can easily see the above account of Shahi origin as totally fanciful and fairy tale-like. These statements taken together are very confusing, inconsistent and bear the express marks of a folklore and vulgar tradition, hence unworthy of inspiring any confidence in the early history of Shahis. The allegation that the first dynasty of Kabul was Turki is plainly based on the vulgar tradition, which Alberuni himself remarked was clearly absurd.
The historian V. A. Smith speculates – based on Alberuni – that the earlier Shahis were a cadet branch of the Kushanas who ruled both over Kabul and Gandhara until the rise of the Saffarids. H. M. Elliot relates the early Kabul Shahis to the Kators and further connects the Kators with the Kushanas. Charles Frederick Oldham also traces the Kabul Shahi lineage to the Kators—whom he identifies with the Kathas orTakkhas—Naga worshipping collective groups of Hinduism (chandravanshi group) lineage. He further speaks of the Urasas, Abhisaras, Daradas, Gandharas, Kambojas, et al. as allied tribal groups of the Takkhas belonging to the Sun-worshiping races of the north-west frontier. D. B. Pandey traces the affinities of the early Kabul Shahis to the Hunas.
Other accounts suggest Punjabi Kshatriya origins for the Shahi dynasty. Xuanzang clearly describes the ruler of Kapisa/Kabul, whom he had personally met, as a devout Buddhist and a Kshatriya and not a Tu-kiue/Tu-kue (Turk). The fact that Xuanzang (AD 644) specifically describes the ruler of Kapisa as Kshatriya, and that of Zabul at this time being known as Shahi casts serious doubt about the speculated connections of the first Shahis of Kabul/Kapisa to the Kushanas or the Hephthalites. Neither the Kushanas, the Hunas/Hephthalites nor the Turks (or Turushkas) have ever been designated or classified as Kshatriyas in any ancient Indian tradition. Therefore, the identification of the first line of Shahi kings of Kapisa/Kabul with the Kushanas, Hunas, or Turks obviously seems to be in gross error.
The Shahi rulers of Kapisa/Kabul who ruled from the early 4th century until 870 CE were Hindu Brahmins. The Shahis of Afghanistan were discovered in 1874 to be connected to the Kamboja "race" by E. Vesey Westmacott.
E. Vesey Westmacott, Bishan Singh, K. S. Dardi, et al. connect the Kabul Shahis to the ancient Indian Kshatriya clans of the Kambojas/Gandharas. George Scott Robertson writes that the Kators/Katirs of Kafiristan belong to the well known Siyaposh tribal group of the Kams, Kamoz and Kamtoz tribes. But numerous scholars now also agree that the Siyaposh tribes of Hindukush are the modern representatives of the ancient Iranian cis-Hindukush Kambojas.
The powerful evidence from Xuanzang (AD 644) attesting that the ruler of Kabul/Kapisa was a devout Buddhist and belonged to Kshatriya caste would rather connect this ruling dynasty either to the erstwhile Gandharas or more probably to Ashvaka clan of the Kambojas, the eminent Kshatriya clan of the Mauryan times from the neighbouring region in India.
The name (Katorman or Lagaturman) of the last king of the so-called first Shahi line of Kabul/Kapisa simply reveals a trace of Tukhara cultural influence in the Kamboja (Kapisa) region, as hinted in the above discussion. Thus, the first ruling dynasty of Kapisa and Kabul, designated as a Kshatriya dynasty by Xuanzang had been a Kamboja dynasty from India.
From the 2nd century BC onwards (much prior to the Huna ascendancy), the Tukharas had settled in considerable numbers in the ancient Kamboja land and thus the culture of the Kambojas undoubtedly underwent some changes and due to the interaction of two cultures, the Kambojas of Kapisa were also substantially influenced by Tukharas who remained for quite a time the ruling power in this region.
This fact is also verified by Xuanzang who records that the literature, customary rules, and currency of Bamiyan were same as those of Tukhara; the spoken language is only little different and in personal appearance the people closely resembled those of the Tukhara country. On the other hand, the literature and written language of Kapisa (=Kamboja) was like that of Tukharas but the social customs, colloquial idiom, rules of behavior (and their personal resemblance) differed somewhat from those of Tukhara country which means that the original and dominant community of Kapisa had imbibed the Tukharan culture and customs but to a limited extent and the penetration of the Tukharas in the Kapisa territory appears to have therefore been also limited. The Kambojas and the Tukharas (Turks) are mentioned as immediate neighbors in north-west as late as the 8th century AD as Rajatarangini of Kalhana demonstrates.
Evidence also exists that some medieval Muslim writers have confused the Kamboja clans of Pamirs/Hindukush with the Turks and invested the former with Turkic ethnicity. For example, 10th-century Arab geographer Al-Muqaddasi, refers to the Kumiji (=Kamoji/Kamboja) tribesmen of Buttaman mountains (Tajikistan), on upper Oxus, and calls them of Turkic race. Song Yun, the Chinese Ambassador to the Huna kingdom of Gandhara, in AD 520 writes that the Yethas (Hephthalites) had invaded Gandhara two generations prior to him and had completely destroyed this country. The then Yetha ruler was extremely cruel, vindictive, and anti-Buddhist and had engaged in a three years border war with the king of Ki-pin (Cophene or Kapisa), disputing the boundaries of that country. The Yetha king referred to by Song Yun may have been Mihirakula (AD 515-540/547) or his governor. This evidence also proves that the Kapisa kingdom was well established prior to the Huna/Hephthalite invasion of Gandhara (c. AD 477) and that it did not submit to the Yethas but had survived and continued to maintain its independence.
Once the political clout of the invaders like the Kushanas or the Hephthalites had declined, some native chieftain from the original dominant clans of this region seems to have attained ascendancy in political power and established an independent kingdom on the ruins of the Kushana and/or the Hephthalite empire.
Commenting on the rise of Shahi dynasty in Kabul/Kapisa, Charles Frederick Oldham observes: "Kabulistan must have passed through many vicissitudes during the troublous times which followed the overthrow of the great Persian empire by the Alexander. It no doubt fell for a time under the sway of foreign rulers (Yavanas, Kushanas, Hunas etc). The great mass of the population, however, remained Zoroastrian or Shamanic Polytheists. And probably too, the Kshatriya chiefs from India retained great shadow of authority, and conquered Kabulistan when the opportunity arose.".
Barhatigin is said to be the founder of the dynasty which is said to have ruled for 60 generations until AD 870. This, if true, would take Barhatigin and the founding of the early Shahi dynasty back about 20x60=1200 years, i.e., to about the 4th century BC if we take the average generation of 20 years; and to the 7th century BC if an average generation is taken as 25 years. It is well nigh impossible that a single dynasty could have ruled for 1200 (or 1500) years at a stretch. Moreover, King Kanik (if Kanishaka) ruled (AD 78 – 101) not over Kabul but over Purushapura/Gandhara and his descendants could not have ruled for almost 900 years as a single dynasty over Kapisa/Kabul especially in a frontier region called the gateway of India. Pre Islamic Hindu and Buddhist heritage of Afghanistan is well established in the Shahi coinage from Kabul of this period.
Based on fragmentary evidence of coins, there was one king named Vrahitigin (Barhatigin?) who belonged to pre-Christian times as Alberuni's accounts would tend to establish. If Kanik is same as Kanishaka of Kushana race as is often claimed, then the second claim that the ancestors of the early Shahis came from Tibet becomes incompatible to known facts of history.
According to Olaf Caroe, "the earlier Kabul Shahis in some sense were the inheritors of the Kushana chancery tradition and were staunch Hindus in character. The affinities of the early Shahis of Kapisa/Kabul are still speculative, and the inheritance of the Kushan-Hephthalite chancery tradition and political institutions by Kabul Shahis do not necessarily connect them to the preceding dynasty (i.e. the Kushanas or Hephthalites).
It appears that from start of the 5th century till AD 793-94, the capital of the Kabul Shahis was Kapisa. As early as AD 424, the prince of Kapisa (Ki-pin of the Chinese) was known as Guna Varman. The name ending "Varman" is used after the name of a Ksahriya only. Thus the line of rulers whom Xuanzang refers to in his chronicles appears to be an extension of the Kshatriya dynasty whom this Guna Varman of Ki-pin or Kapisa (AD 424) belonged. Thus this Kshatriya dynasty was already established prior to AD 424 and it was neither a Kushana nor a Hephthalite dynasty by any means.
It appears more than likely that, rather than the Kushanas or Hunas or the Turks, the Shahi rulers of Kabul/Kapisa and Gandhara had a descent from the neighbouring warlike Kshatriya clans of the Kambojas known as Ashvakas (q.v.), who in the 4th century BC, had offered stubborn and decisive resistance to Macedonian invader, Alexander, and later had helped Chandragupta Maurya found the Mauryan empire of India. They were the same bold and warlike people on whom king Ashoka Maurya had thought it wise and expedient to bestow autonomous status and to whom he gave eminent place in his Rock Edicts V and XIII. They were fiercely independent warlike people who had never easily yielded to any foreign overlord. They were the people who, in the 5th century AD, had formed the very neighbours of the Bactrian Ephthalites of Oxus and whom Chandragupta II of Gupta dynasty had campaigned against and had obtained tribute from about the start of the 5th century AD. Dr V. A. Smith says that this epic verse is reminiscent of the times when the Hunas first came into contact with the Sassanian dynasty of Persia. Sata-pañcāśaddesa-vibhaga of the medieval era Tantra book Saktisamgma Tantra locates Kambojas (Kabul Shahis?) to the west of southwest Kashmir (or Pir-pañcāla), to the south of Bactria and to the east of Maha-Mlechcha-desa (=Mohammadan countries i.e Khorasan/Iran) and likewise, locates the Hunas (Zabul Shahis?) to the south of Kama valley (or Jallalabad/Afghanistan) and to the north of Marudesa (or Rajputana) towards western Punjab.
The Kavyamimasa of Rajshekhar also lists the Sakas, Kekayas, Kambojas, Vanayujas, Bahlikas, Hunas, Pahlvas, Limpakas, Harahuras, Hansmaragas (Hunzas) etc  in the north-west. Since Rajshekhar (AD 880–920) was contemporary with Hindu Shahis, he identifies people called Kambojas (Kabul/Kapisa), Vanayujas (Bannus), Limpakas (Lamghanis), Hunas (Zabul), Pahlvas (Persians—Maha-mlechchas), Harahuras (Red Hunas located in Herat) etc almost exactly in the same localities which were occupied by Kabul Shahi and Zabul Shahi kingdoms respectively. The above referred to pieces of evidence again spotlight on the Kambojas and the Hunas together and places them near the environs of the Muslim Persians in north-west. During the 1st century AD and later in the 5th century (c. AD 477), the cis-Hindukush Kambojas and Gandharas partially came under the sway of foreign invaders like the Kushanas and the Hephthalites (Hunas). These warlike people were temporarily overpowered by the numerous hordes but they did not become extinct; and once the political tide of the foreign hordes ebbed, someone from the native chieftains from the original dominant clans (i.e. the Ksatrya Ashvakas) of this region asserted his authority and attained ascendancy in political power and had established himself as Kshatriya overlord of an independent kingdom on the ruins of the erstwhile Kushana and/or the Hephthalites empire.
In ancient time, the title Shahi appears to be a quite popular royal title in Afghanistan and the north-western areas of the Indian sub-continent. Sakas, Kushanas, Hunas, Bactrians, by the rulers of Kapisa/Kabul, and Gilgit used it.[verification needed] In Persian form, the title appears as Kshathiya, Kshathiya Kshathiyanam, Shao of the Kushanas and the Ssaha of Mihirakula (Huna chief). The Kushanas are stated to have adopted the title Shah-in-shahi ("Shaonano shao") in imitation of Achaemenid practice.
An ancient Jaina work, Kalakacarya-kathanaka, says that the rulers of the Sakas who had invaded Ujjaini/Malwa in 62 BC also used the titles of Sahi and Sahnusahi. Since the title Shahi was used by the rulers of Kapisa/Kabul or Gandhara also in imitation of Kushana "Shao", it has been speculated by some writers that the Shahi dynasty of Kapisa/Kabul or Gandhara was a foreign dynasty and had descended from the Kushans or Turks (Turushkas). However, the title has been used by several rulers irrespective of any racial connotations and this may refute the above speculation.
In addition, one ancient inscription and several ancient Buddhist manuscripts from the Gilgit area between upper Indus and river Kabul shed some light on the three kings who ruled in the Gilgit region in the 6th and 7th centuries AD. They also bore Shahi titles and their names are mentioned as Patoladeva alias Navasurendradiyta Nandin, Srideva alias Surendra Vikrmadiyta Nandin and Patoladeva alias Vajraditya Nandin. It is very relevant to mention here that each of the Shahi rulers mentioned in the above list of Gilgit rulers has Nandin as his surname or last name It is more than likely that the surname Nandin refers to their clan name. It is also very remarkable that the modern Kamboj tribe of northern Punjab still has Nandan (Nandin) as one of their important clan names. It is therefore very likely that these Gilgit rulers of upper Indus may also have belonged to the Kamboja lineage. Furthermore, "Shahi, Sahi, Shahiya" as a septal name is still carried by a section of the Punjab Kambojs which appears to be a relic from the Shahi title of their Kabul/Kapisa princes.
Alberuni's reference to the supplanting of the Kabul Shahi dynasty in about AD 870 by a Brahmin called Kallar actually implies only that the religious faith of the royal family had changed from Buddhism to Hinduism by about that date; it might not have actually involved any physical supplanting of the existing Kabul Shahi dynasty as is stated by Alberuni whose account of early Shahis is indeed based on telltale stories.
Archeological sites of the period, including a major Hindu Shahi temple north of Kabul and a chapel in Ghazni, contain both the pre-dominant Hindu and Buddhist statuary, suggesting that there was a close interaction between the two religions.
When the Chinese monk Xuanzang visited Kapisa (about 60 km north of modern Kabul) in the 7th century, the local ruler was a Kshatriya King Shahi Khingala. A Ganesha idol has been found near Gerdez that bears the name of this king, see Shahi Ganesha.
Several 6th- or 7th-century AD Buddhist manuscripts were found from a stupa at Gilgit. One of the manuscripts reveals the name of a Shahi king Srideva Sahi Surendra Vikramaditya Nanda.
In the wake of Muslim invasions of Kabul and Kapisa in second half of the 7th century (AD 664), the Kapisa/Kabul ruler called by Muslim writers Kabul Shah (Shahi of Kabul) made an appeal to the Kshatriyas of the Hind who had gathered there in large numbers for assistance and drove out the Muslim invaders as far as Bost. This king of Kapisa/Kabul who faced the Muslim invasion was undoubtedly a Kshatriya.
In AD 645, when Chinese pilgrim Xuanzang was passing through the Uttarapatha, Udabhanda or Udabhandapura was the place of residence or secondary capital of emperor of Kapisa which then dominated over 10 neighboring states comprising Lampaka, Nagara, Gandhara and Varna (Bannu) and probably also Jaguda. About Gandhara, the pilgrim says that its capital was Purushapura; the royal family was extinct and country was subject to Kapisa; the towns and villages were desolate and the inhabitants were very few. It seems that under pressure from Arabs in the southwest and the Turks in the north, the kings of Kapisa had left their western possessions in the hands of their viceroys and made Udabhanda their principal seat of residence. The reason why Udabhandapura was selected in preference to Peshawar is at present unknown but it is possible that the new city of Udabhanda was built by Kapisa rulers for strategic reasons.
In subsequent years, the Muslim armies returned with large reinforcements and Kabul was swept when the Shahi ruler agreed to pay tribute to the conquerors. For strategical reasons, the Shahis, who continued to offer stubborn resistance to Muslim onslaughts, finally moved their capital from Kapisa to Kabul in about AD 794. Kabul Shahis remained in Kabul until AD 879 when Ya'qub-i Laith Saffari, the founder of the Saffarid dynasty, conquered the city. Kabul Shahis had built a defensive wall all around the Kabul city to protect it against the army of Muslim Saffarids. The remains of these walls are still visible over the mountains which are located inside the Kabul city.
The first Hindu Shahi dynasty was founded in AD 870 by Kallar (see above). Kallar is well documented to be a Brahmin. The kingdom was bounded on the north by the Hindu kingdom of Kashmir, on the east by Rajput kingdoms, on the south by the Muslim Emirates of Multan and Mansura, and on the west by the Abbasid Caliphate.
According to the confused accounts recorded by the Persian historian Al-Biruni which are chiefly based on folklore, the last king of the first Shahi dynasty, Lagaturman (Katorman) was overthrown and imprisoned by his Brahmin vizier Kallar, thus resulting in the change-over of dynasty.
The Hindu Shahi, a term used by Al-Biruni to refer to the ruling Hindu dynasty that took over from the Turki Shahi and ruled the region during the period prior to Muslim conquests of the 10th and 11th centuries.
The term Hindu Shahi was a royal title of this dynasty and not its actual clan or ethnological name. Al-Biruni used the title Shah for many other contemporary royal houses in his descriptions as well.
It is very remarkable[according to whom?] that Kalhana (c. 12th century), the author of Rajatarangini (written in AD 1147–49), also refers to the Shahis and does not maintain any difference or distinction between the earlier Shahis (RT IV.143) and the later Shahis or does not refer to any supplanting of the dynasty at any stage as Alberuni does in his Tarikh-al-Hind. etc., unbroken to as far as or earlier than AD 730. It is also remarkable[according to whom?] that Rajatrangini and all other sources refer to the Shahi rulers of Udabhandapura/Waihind as belonging to the Kshatriya lineage in contrast to Alberuni who designates the earlier Shahi rulers as Turks and the later as Brahmins
Since the change of Shahi capital from Kabul to Waihind or Uddhabhandapura had also occurred precisely around this period, it is probable that the narrator of the folklore/tellatale to Alberuni had confused the "change of capital" issue with the "supplanting of Kabul Shahi dynasty" since the incidence of shift had occurred remotely about 200 years prior to Alberuni's writing (AD 1030). There is no doubt, as the scholars also admit, that the change in dynasty is effected by "a common legend of eastern story", which surely bears the express mark of folklore for the previous history of Kabul Shahis, hence obviously speculative and not much worthy of serious history.
The Hindu Shahis became engaged with the Yamini Turks of Ghazni over supremacy of the eastern regions of Afghanistan initially before it extended towards the Punjab region. They briefly recaptured the Kabul Valley from the Samanid successors of the Saffarids, until a general named Alptigin drove out the Samanid wali of Zabulistan and established the Ghaznavid dynasty at Ghazna. Under his general and successor Sabuktigin the Ghaznavids had begun to raid the provinces of Lamghan. and Multan. This precipated an alliance first between the then King Jayapala and the Amirs of Multan, and then in a second battle in alliance with Delhi, Ajmer, Kalinjar, and Kannauj which saw the Hindu Shahi lose all lands west of the Indus River. His successor Anandapala arrived at a tributary arrangement with Sebuktigin's successor, Mahmud of Ghazni, before he was defeated and exiled to Kashmir in the early 11th century.
Al-Idirisi (AD 1100-1165/66) testifies that until as late as the 12th century, a contract of investiture for every Shahi king was performed at Kabul and that here he was obliged to agree to certain ancient conditions which completed the contract. Kalhana remarked: "To this day, the appellation Shahi throws its lustre on a numberless host of kshatriya abroad who trace their origin to that family".
The kings of Kashmir were related to the Shahis through marital and political alliance. Didda, a queen of Kashmir was a granddaughter of the Brahmin Shahi Bhima, who was married to Kshemagupta (r. 951–959). Bhima had visited Kashmir and built the temple Bhima Keshava.
The initial Hindu Shahi dynasty was the House of Kallar, but in AD 964 the rule was assumed from Bhima upon his death by Jayapala, son of Rai Asatapala . Epithets from the Bari Kot inscriptions record his full title as "Parambhattaraka Maharajadhiraja Paramesvara Sri Jayapala deva" the first Emperor of the Janjua Shahi phase. He is celebrated as a hero for his struggles in defending his kingdom from the Turkic rulers of Ghazni.
Emperor Jayapala was challenged by the armies of Sultan Sabuktigin in Battle of Peshawar (1001) and later by his son Sultan Mahmud of Ghazni. According to the Minháj ad-Dīn in his chronicle Tabaqát-i Násiri, he bears a testament to the political and powerful stature of Maharaja Jayapala Shah, "Jayapála, who is the greatest of all the ráis (kings) of Hind..." Misra wrote on Jaypala: "(He) was perhaps the last Indian ruler to show such spirit of aggression, so sadly lacking in later Rajput kings."
Prince Anandapala who ascended his father's throne (in about March/April AD 1002) already proved an able warrior and general in leading many battles prior to his ascension. According to 'Adáb al-Harb' (pp. 307–10) in about AD 990, it is written, "the arrogant but ambitious Raja of Lahore Bharat, having put his father in confinement, marched on the country of Jayapála with the intention of conquering the districts of Nandana, Jailum (Jehlum) and Tákeshar" (in an attempt to take advantage of Jayapala's concentrated effort with defence against the armies of Ghazni). "Jayapala instructed Prince Anandapala to repel the opportunist Raja Bharat. Anandapala defeated Bharat and took him prisoner in the battle of Takeshar and marched on Lahore and captured the city and extended his father's kingdom yet further."
However, during his reign as emperor many losses were inflicted on his kingdom by the Ghaznavids. During the battle of Chach between Mahmud and Anandapala, it is stated that "a body of 30,000 Gakhars fought alongside as soldiers for the Shahi Emperor and incurred huge losses for the Ghaznavids". However, despite the heavy losses of the enemy, he lost the battle and suffered much financial and territorial loss. This was Anandapala's last stand against Sultan Mahmud of Ghazni. He eventually signed a treaty with the Ghaznavid Empire in AD 1010 and shortly a year later died a peaceful death. R.C Majumdar (D.V. Potdar Commemoration Volume, Poona 1950, p. 351) compared him ironically to his dynastic ancient famous ancestor "King Porus, who bravely opposed Alexander but later submitted and helped in subduing other Indian rulers". And Tahqíq Má li'l-Hind (p. 351) finally revered him in his legacy as "noble and courageous" .
Prince Trilochanpála, the son of Anandapala, ascended the imperial throne in about AD 1011. Inheriting a reduced kingdom, he immediately set about expanding his kingdom into the Sivalik Hills, the domain of the Rai of Sharwa. His kingdom now extended from the River Indus to the upper Ganges valley. According to Al-Biruni, Tirlochanpála "was well inclined towards the Muslims (Ghaznavids)" and was honourable in his loyalty to his father's peace treaty to the Ghaznavids. He eventually rebelled against Sultan Mahmud and was later assassinated by some of his own mutinous troops in AD 1021–22, an assassination which was believed to have been instigated by the Rai of Sharwa who became his arch-enemy due to Tirlochanpala's expansion into the Siwalik ranges. He was romanticised in Punjabi folklore as the Last Punjabi ruler of Punjab.
Prince Bhímapála, son of Tirlochanpala, succeeded his father in AD 1021–22. He was referred to by Utbí as "Bhīm, the Fearless" due to his courage and valour. Considering his kingdom was at its lowest point, possibly only in control of Nandana, he admirably earned the title of "fearless" from his enemy's own chronicle writer. He is known to have commanded at the battle of Nandana personally and seriously wounded the commander of the Ghaznavid army Muhammad bin Ibrahim at-Tāī ('Utbi, vil.ii, p. 151.). He ruled only five years before meeting his death in AD 1026. He was final Shahi Emperor of the famed dynasty.
His sons Rudrapal, Diddapal, Kshempala, and Anangpala served as generals in Kashmir. They gained prominence in the Kashmiri royal court where they occupied influential positions and intermarried with the royal family. Hindu Kashmir had aided the Hindus Shahis against Mahmud of Ghazni. As a result after barely defeating the Hindu Shahis, Mahmud marched his men to Hindu Kashmir to take revenge for Kashmir's support of the Hindu Shahis. Al-Biruni was with Mahmud on these campaigns. They are mentioned frequently in Rajatarangini of Kalhana written during AD 1147–49. Rudrapal was mentioned by the writer Kalhana as a valiant general in the campaigns he led to quell resistance to the Kashmiri kings whom they served whilst in exile. His later descendants fell out of favour at the royal court and were exiled to the Siwalik Hills, retaining control of the Mandu fort. After a brief period, they rose again to take control of Mathura under Raja Dhrupet Dev in the 12th century before the campaigns of the Ghorid Empire.
Part of a series on the
|History of Afghanistan|
|Outline of South Asian history|
|Northwestern India||Indo-Gangetic Plain||Central India||Southern India|
|Upper Gangetic Plain||Middle Gangetic Plain||Lower Gangetic Plain|
|Culture||Late Vedic Period||Late Vedic Period
|Late Vedic Period
|6th century BC||Gandhara||Kuru-Panchala||Magadha||Adivasi (tribes)|
|Culture||Persian-Greek influences||"Second Urbanisation"||Pre-history|
|5th century BC||(Persian rule)||Shishunaga dynasty||Adivasi (tribes)|
|4th century BC||(Greek conquests)||Nanda empire|
|Culture||Spread of Buddhism||Pre-history||Sangam period
(300 BC – 200 AD)
|3rd century BC||Maurya Empire||Early Cholas
46 other small kingdoms in Ancient Thamizhagam
|Culture||Preclassical Hinduism[c] - "Hindu Synthesis"[d] (ca. 200 BC - 300 AD)[e][f]
Epics - Puranas - Ramayana - Mahabharata - Bhagavad Gita - Brahma Sutras - Smarta Tradition
|2nd century BC||Indo-Greek Kingdom||Shunga Empire||Early Cholas
46 other small kingdoms in Ancient Thamizhagam
|1st century BC|
|1st century AD||Kuninda Kingdom|
|2nd century||Kushan Empire|
|3rd century||Kushano-Sasanian Kingdom||Kushan Empire||Western Satraps||Kamarupa kingdom||Kalabhra dynasty|
|Culture||"Golden Age of Hinduism"(ca. AD 320-650)[g]
Co-existence of Hinduism and Buddhism
|4th century||Kidarites||Gupta Empire||Kalabhra dynasty|
|5th century||Hephthalite Empire||Alchon Huns||Kalabhra dynasty|
|6th century||Nezak Huns||Maitraka||Adivasi (tribes)||Badami Chalukyas|
|Culture||Late-Classical Hinduism (ca. AD 650-1100)[h]
Advaita Vedanta - Tantra
Decline of Buddhism in India
|7th century||Indo-Sassanids||Vakataka dynasty
Empire of Harsha
|Mlechchha dynasty||Adivasi (tribes)||Pandyan Kingdom(Under Kalabhras)|
|8th century||Kabul Shahi||Pala Empire||Pandyan Kingdom|
|9th century||Gurjara-Pratihara||Rashtrakuta dynasty|
|10th century||Ghaznavids||Pala dynasty||Kalyani Chalukyas|