The Shahi dynasty ruled the Middle kingdom of India which included portions of Kabulistan and the old province of Gandhara (now in northern Pakistan). Their rule began with the decline of the Kushan Empire in the 3rd century and continued till the early 9th century.
The Shahis of Kabul / Gandhara are divided according to two eras into two former non-muslim dynasties in Kabul, the Buddhist-Shahis or Turk- Shahis and the Hindu Shahis. The Buddhist kingdom was known as ''Turk Shahi'' and reigned between 565 and 850 AD and had Kapisa and Kabul as their capitals. Around 850 AD, the kingdom adopted Hinduism and began to be known as ''Hindu- Shahi''. In 870 AD, they moved their capital to Udbhandapur. The Hindu-Shahi ruled from around 850 to 1026 AD.
The term ''Shahi'' was the royal title of this dynasty and not its clan or ethnological name.
Between both the Turk-Shahi and the Hindu- Shahi, they effectively blocked the eastward expansion of Islamic invasions for more than 400 years and contributed to the history of India.
The Turk-Shahis / Buddhist- Shahis resisted the eastward expansion of the Caliphate for more than 240 years.
The Turk Shahi Tamgha
The Hindu-Shahi (850 -1026 AD) held sway over the Kabul valley, Gandhara and western Punjab. Details have been assembled from chronicles, coins, stone inscriptions and temple ruins by researchers as their accounts have been destroyed systematically and are not available today.
In 870 AD they lost Kabul to the Saffarid dynasty, but by 879 AD, the Hindu-Shahi recaptured it. According to ''The Mazare Sharif Inscription of the Time of the Shahi Ruler Veka'', recently discovered from northern Afghanistan and reported by the Taxila Institute of Asian Civilizations, Islamabad, Veka conquered northern regions of Afghanistan and established a Shiva temple there. He also issued coins.
During the Turk Shahi period, the Islamic invasions started in 643 AD and lasted for over 240 years till 879 AD . The notable defeats suffered by aggressor were recorded in 643 AD, 653 AD , 683 AD, 692 AD, 697 AD and 717 AD which resulted in annihilation of the invaders every time they attacked. The capital was shifted from Kapisa to Kabul in 794 AD. Kabul suffered a temporary eclipse in 870 AD when the king of Kabul was treacherously killed, however Kabul still could not be captured.
Around this time, the courts of Shahis denounced Buddhism and became an adherent of Hindu faith. Thus, the Hindu Shah dynasty was founded in 850 AD. In 879 AD, the king of Kabul was killed in battle and in 890 AD, the capital was shifted to Udbhandpur on the River Indus.
Maharaja Jayapala (946 to 1001 AD). He was one of the greatest rulers and is known for his struggles in defending his kingdom from the Turkic rulers of Gazni.
Ruins of the majestic temple that still stands today.
Sculpture from Kafir Kot at the British Museum
Sculpture from Kafir Kot at the British Museum
Temple ruins at the Kafir Kot temple complex
In 994 AD, the Ghazanavid Empire fell into the hands of Mahmud of Ghazni. Mahmud led his first invasion against Udbhandapur in 1001 AD. Jayapala was captured. However, the territory was not annexed as great damage was inflicted on Mahmud's army, which made him incapable of ruling the vast land. For several years this battle between Mahmud and the Shahi dynasty continued. Battles of 1005 AD, 1008 AD,1013 AD, 1015 AD, 1021 AD and 1026 AD are significant and the valour of subsequent Hindu Shahi kings have been described by many historians. For more than 150 years, stiff resistance was given by the Hindu Shahi rulers.